Email::Sender::Transport::SMTP::TLS - Email::Sender with Net::SMTP::TLS (Eg. Gmail)
use Email::Sender::Transport::SMTP::TLS; my $sender = Email::Sender::Transport::SMTP::TLS->new( host => 'smtp.gmail.com', port => 587, username => 'username@gmail.com', password => 'password', helo => 'fayland.org', ); # my $message = Mail::Message->read($rfc822) # || Email::Simple->new($rfc822) # || Mail::Internet->new([split /\n/, $rfc822]) # || ... # || $rfc822; # read L<Email::Abstract> for more details use Email::Simple::Creator; # or other Email:: my $message = Email::Simple->create( header => [ From => 'username@gmail.com', To => 'to@mail.com', Subject => 'Subject title', ], body => 'Content.', ); eval { $sender->send($message, { from => 'username@gmail.com', to => [ 'to@mail.com' ], } ); }; die "Error sending email: $@" if $@;
Email::Sender replaces the old and sometimes problematic Email::Send library, while this module replaces the Email::Send::SMTP::TLS.
It's still alpha. use it at your own risk!
The following attributes may be passed to the constructor:
If allow_partial_success was set when creating the transport, the transport may return Email::Sender::Success::Partial objects. Consult that module's documentation.
allow_partial_success
Fayland Lam, <fayland at gmail.com>
<fayland at gmail.com>
Ricardo SIGNES - Email::Sender
Copyright 2008 Fayland Lam, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Email::Sender::Transport::SMTP::TLS, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::Sender::Transport::SMTP::TLS
CPAN shell
perl -MCPAN -e shell install Email::Sender::Transport::SMTP::TLS
For more information on module installation, please visit the detailed CPAN module installation guide.