Email::Send::TheSchwartz - Send Messages using TheSchwartz
use Email::Send; my $mailer = Email::Send->new({ mailer => 'TheSchwartz' }); $mailer->mailer_args([ databases => [ ... ] ]); $mailer->send($message);
This mailer for Email::Send uses TheSchwartz to send a message via the Schwartz reliable messaging system. The first invocation of send requires arguments used to initialize a new TheSchwartz object (a list of databases). Subsequent calls will remember the the first setting until it is reset.
Email::Send
TheSchwartz
send
This module is only half of the solution to sending email via TheSchwartz; all this module does is insert email jobs into the database. The other half of the solution comes in TheSchwartz::Worker::SendEmail, a worker class for pulling jobs from the queue in the database, and connecting to the remote servers to send the messages.
All return values from this package are true or false. If false, sending has failed. If true, send succeeded. The return values are Return::Value objects, however, and contain more information on just what went wrong.
Return::Value
A successful return value also contains more information: it contains a handle for the job that was inserted into the database (a TheSchwartz::JobHandle object). It can be accessed like this:
TheSchwartz::JobHandle
my $return = $mailer->send($message); if ($return) { my $handle = $return->prop('handle'); ... }
For more information on these return values, see Return::Value.
Email::Send::TheSchwartz is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
Email::Send::TheSchwartz
Except where otherwise noted, Email::Send::TheSchwartz is Copyright 2007 Six Apart, cpan@sixapart.com. All rights reserved.
To install Email::Send::TheSchwartz, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Email::Send::TheSchwartz
CPAN shell
perl -MCPAN -e shell install Email::Send::TheSchwartz
For more information on module installation, please visit the detailed CPAN module installation guide.