Script to send a mail
#!E:\Perl\bin -w
use MIME::Lite;
MIME::Lite->send('smtp', "mailtesthub.gmail.com", Timeout=>90);
my $MailFrom = 'test@gmail.com';
my $to_list = 'john@gmail.com';
my $cc_list = 'frank@yahoo.com';
my $subject = "hello test";
my $message = "This email was generated automatically.";
my $msg = MIME::Lite->new(
From => $MailFrom,
To => $to_list,
Cc => $cc_list,
Subject => $subject,
Type => 'TEXT',
Encoding => '7bit',
Data => $message,
);
$msg->send()
Wednesday, June 9, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment