28 November 2007
This post may be outdated due to it was written on 2007. The links may be broken. The code may be not working anymore. Leave comments if needed.
I wrote a new CPAN module Email::Send::SMTP::TLS.
it can use Gmail smtp.gmail.com to send email, and it runs well under Win32.

I tried Email::Send::Gmail, but it's not working in my computer at all.

example:

use Email::Send;

my $mailer = Email::Send->new( {
mailer => 'SMTP::TLS',
mailer_args => [
Host => 'smtp.gmail.com',
Port => 587,
User => [email protected]',
Password => 'password',
Hello => 'fayland.org',
]
} );

use Email::Simple::Creator; # or other Email::
my $email = Email::Simple->create(
header => [
From => [email protected]',
To => [email protected]',
Subject => 'Subject title',
],
body => 'Content.',
);

eval { $mailer->send($email) };
die "Error sending email: $@" if $@;


blog comments powered by Disqus