CGI::Bus::smtp - simple SMTP sender


NAME

CGI::Bus::smtp - simple SMTP sender


SYNOPSIS

 use CGI::Bus;
 $s =CGI::Bus->new();
 $s->smtp(-server=>'localhost')->mailsend(...);


DESCRIPTION

This module is a simple SMTP sender. Uses Net::SMTP. See CGI::Bus::Base for inherited slots and methods.


SLOTS

-domain
Default mail domain, for usernames without '@'

-host
SMTP server name or address


METHODS

addrtr ( address ) -> translated
Translates address given if needed. Removed backslashes, adds -domain...

mailsend ( ?from, ?\@to, row,... ) - > success
Sends message, catenating rows via ``\n''. If 'from' or 'to' argument undefined, values are searched within rows of message as 'From:', 'Sender:', 'To:'. If array reference 'to' occurs in place of message row, it will be converted to 'To:' MIME string.

smtp ( option => value ) -> new SMTP object
Creates and returns new Net::SMTP object


VERSION

20/12/2001 - 22/12/2001

New:
Implemented and Documented.

ToDo:
Review.


AUTHOR

Andrew V Makarow <makarow at mail.com>

 CGI::Bus::smtp - simple SMTP sender