POE::Component::Client::SMTP is a Perl module for asynchronous mail sending with POE. Thus your program isn't blocking while busy talking with an (E)SMTP server.
SYNOPSIS
Warning! The following examples are not complete programs, and aren't designed to be run as full blown applications. Their purpose is to quickly introduce you to the module.
For complete examples, check the 'eg' directory that can be found in the distribution's kit.
A simple example:
# load PoCoClient::SMTP
use POE::Component::Client::SMTP;
# spawn a session
POE::Component::Client::SMTP->send(
From => 'foo@baz.com',
To => 'john@doe.net',
Server => 'relay.mailer.net',
SMTP_Success => 'callback_event_for_success',
SMTP_Failure => 'callback_event_for_failure',
);
# and you are all set ;-)
A more complex example:
# load PoCoClient::SMTP
use POE::Component::Client::SMTP;
# spawn a session
POE::Component::Client::SMTP->send(
# Email related parameters
From => 'foo@baz.com',
To => [
'john@doe.net',
'andy@zzz.org',
'peter@z.net',
'george@g.com',
],
Body => $email_body, # here's where your message is stored
Server => 'relay.mailer.net',
Timeout => 100, # 100 seconds before timeouting
# POE related parameters
Alias => 'pococlsmtpX',
SMTP_Success => 'callback_event_for_success',
SMTP_Failure => 'callback_event_for_failure',
);
# and you are all set
Product's homepage
Requirements:
· Perl