Hi
I am also wroking on same task( Sending email when ever there is error in logs) to know how to lib please can u share your perl program. by refering your program i can complete my task.
don't have Mail::Mailer & Mail::Sendmail; installed. | [reply] |
Hi,
I am using activeperl and tried to send mail using the Mail::sendmail code provided by you. I am not getting errors when i run the perl script but my also doesn't go.
here is my script. How do I provide login information to the gmail server, or is it not required? Is this the right way?
#!C:/Perl/bin/perl.exe
use Mail::Sendmail;
print "Hello World1.\n";
my $to_list = 'gsarin83@gmail.com';
my $cc_list = 'aryan_42k@yahoo.com';
my $email = "\n\nThis email was generated automatically.\n";
my $MailFrom = "gs.engr@gmail.com";
my $subject = "hello test";
print "Hello World2.\n";
my $message = "module test";
%mail = (
To => $to_list,
From => $MailFrom,
Bcc => $bcc_list,
Cc => $cc_list,
Subject => $subject,
Message => $message
);
$mail{Smtp} = 'smtp.gmail.com';
sendmail(%mail);
print "Hello World3.\n";
Thanks,
Gaurav | [reply] |
Hi,
I am using activeperl and tried to send mail using the Mail::sendmail code provided by you. I am not getting errors when i run the perl script but my also doesn't go.
here is my script. How do I provide login information to the gmail server, or is it not required? Is this the right way?
| [reply] |