NAME
XAS::Lib::Modules::Email - The Email module for the XAS environment
SYNOPSIS
Your program can use this module in the following fashion:
package My::App;
use XAS::Class
version => '0.01',
base => 'XAS::Lib::App'
;
sub main {
$self->email->send(
-from => "me\@localhost",
-to => "you\@localhost",
-subject => "Testing",
-message => "This is a test"
);
}
1;
DESCRIPTION
This is the the module for sending email within the XAS environment. It is implemented as a singleton. It can also be auto-loaded when the method 'email' is invoked.
METHODS
new
This method initializes the module. It uses parameters from XAS::Lib::Modules::Environment to set defaults.
send
This method will send an email. It takes the following parameters:
- -to
-
The SMTP address of the recipient.
- -from
-
The SMTP address of the sender.
- -subject
-
A subject line for the message.
- -message
-
The text of the message.
- -attachment
-
A file name to append to the message.
SEE ALSO
AUTHOR
Kevin L. Esteb, <kevin@kesteb.us>
COPYRIGHT AND LICENSE
Copyright (C) 2014 Kevin L. Esteb
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
See http://dev.perl.org/licenses/ for more information.