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

XAS

AUTHOR

Kevin L. Esteb, <kevin@kesteb.us>

COPYRIGHT AND LICENSE

Copyright (C) 2014 Kevin L. Esteb

This is free software; you can redistribute it and/or modify it under the terms of the Artistic License 2.0. For details, see the full text of the license at http://www.perlfoundation.org/artistic_license_2_0.