Email::Sender::Server::Client - Email Delivery Agent
version 0.10
# sending email is simple use Email::Sender::Server::Client 'mail'; my @message = (to => '...', subject => '...', body => '...'); my $mail = mail(@message); unless ($mail->error_count) { print $mail->id; }
or using an object-oriented approach ....
use Email::Sender::Server::Client; my $mail = Email::Sender::Server::Client->new; my @message = (to => '...', subject => '...', body => '...'); $mail->send(@message); if ($mail->error_count) { print $mail->errors_to_string; }
altering or using a non-sendmail transport ...
use Email::Sender::Server::Client; my $mail = Email::Sender::Server::Client->new; my @message = (to => '...', subject => '...', body => '...'); $mail->transport({ # key is the Email::Sender transport driver, # value is the transport driver's arguments STMP => { host => '...', port => '...', } }); $mail->send(@message); if ($mail->error_count) { print $mail->errors_to_string; }
Currently all ESS classes operate out of the current-working-directory which can be sub-optimal, especially when used in other classes that can be utilized by various different scripts.
The ESS_DATA environment variable can be set to change the path of the .ess directory utilized by the current program, otherwise you may use the path attribute.
use Email::Sender::Server::Client; my $mail = Email::Sender::Server::Client->new( path => '/path/to/.ess-folder' );
Email::Sender::Server::Client provides an interface to a non-blocking email delivery agent which queues emails for later delivery.
Email::Sender::Server::Client wraps functionality provided by Email::Sender::Server::Message.
Al Newkirk <awncorp@cpan.org>
This software is copyright (c) 2012 by awncorp.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Email::Sender::Server, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::Sender::Server
CPAN shell
perl -MCPAN -e shell install Email::Sender::Server
For more information on module installation, please visit the detailed CPAN module installation guide.