in reply to Net::SMTP and Arrays
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.$smtp->datasend( "Subject: FTP Access \n" ); $smtp->datasend( "\n\n" ); #Send the body
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:
When you've got this worked out, turn debug off, by setting it to 0, in the constructor.my $smtp = Net::SMTP->new($smtp_server, Hello => $my_mail_servers_id, Debug => 1 ) or return 0;
-- Hugh
|
|---|