in reply to Net::SMTP and Arrays

Also, if I understand the RFC for email, you need two line feeds between the header and the body of the email message. So it looks like this instead:

$smtp->datasend( "Subject: FTP Access \n" ); $smtp->datasend( "\n\n" ); #Send the body
I tend to use MIME::Lite to construct the message, then its ->body_as_string() and ->header_as_string() methods, to feed into the $smtp->datasend() methods.

Also, Net::SMTP has a debug flag you can set in its constructor, which will give you very verbose feedback, every step of the way. Did you check the return value of your constructor? If the smtp server can not be reached, the constructor should fail. After reviewing perdoc for this module to make sure I got this right, try something like this:

my $smtp = Net::SMTP->new($smtp_server, Hello => $my_mail_servers_id, Debug => 1 ) or return 0;
When you've got this worked out, turn debug off, by setting it to 0, in the constructor.

-- Hugh

if( $lal && $lol ) { $life++; }