The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Email::Sender::Server::Client - Email Delivery Agent

VERSION

version 0.10

SYNOPSIS

    # 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'
    );

DESCRIPTION

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.

AUTHOR

Al Newkirk <awncorp@cpan.org>

COPYRIGHT AND LICENSE

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.