smtp.self - mail a message via smtp
C<smtp.self> will attempt to send a message to a given user
Enabe the output of dubug information
Display this help text and quit
Send the message to C<USERNAME>
demos/smtp.self -user foo.bar
demos/smtp.self -debug -user Graham.Barr
GetOptions
(qw(debug user=s help));
Net
::SMTP
->debug(1) if $opt_debug;
$smtp = Net
::SMTP
->new("mailhost");
$user = $opt_user || $ENV{USER
} || $ENV{LOGNAME
};
$smtp->mail($user) && $smtp->to($user);
if($smtp->mail($user) && $smtp->to($user))
map { s/-USER-/$user/g } @data=<DATA
>;
The message was sent directly via SMTP using Net
::SMTP
The message was sent directly via SMTP using Net
::SMTP