NAME

Net::SMTP::OneLiner - extension that polutes the local namespace with a send_mail() function.

A brief example

use Net::SMTP::OneLiner;

my $from = 'me@mydomain.tld';
my $to   = [qw(some@targ.tld one@targ.tld)];
my $cc   = [qw(some@targ.tld one@targ.tld)];
my $bcc  = [qw(some@targ.tld one@targ.tld)];
my $subj = "The Subject";
my $msg  = "The Message";
my $labl = { 'me@mydomain.tld' => "My RealName", 'one@targ.tld' => "Their realname" };

 
# Examples:

send_mail($from, $to, $subj, $msg);
send_mail($from, $to, $subj, $msg, $cc);
send_mail($from, $to, $subj, $msg, undef, $bcc);
send_mail($from, $to, $subj, $msg, $cc, $bcc, $labl);
send_mail($from, $to, $subj, $msg, undef, undef, $labl);

send_mail('me@domain', ['you@domain'], "heyya there", "supz!?!?");

# The simplest way:

send_mail('me@domain', 'you@domain', "heyya there", "supz!?!?");

# $to will take a scalar argument, $cc and $bcc will not.
# At this time, the mail server, must be the localhost.

Bugs

Please report bugs immediately! The author has not tested this module worth a lick -- expecting it to work just fine. If this is not the case, he would like to know, so he can fix it.

Author

Jettero Heller jettero@cpan.org