I cannot work out why the following script does not work
#!/usr/bin/perl -wT use Net::SMTP; $smtp = Net::SMTP->new('mailservername.net', Debug => 1, ); $smtp->mail('peter@mydomain.com'); $smtp->to("peter\@home.emailaddress.com"); $smtp->data(); $smtp->datasend("To: Peter\n"); $smtp->datasend("\n"); $smtp->datasend("test send\n"); $smtp->dataend(); $smtp->quit;
There are no error messages, and no email received, yet when I use the (NMS) FormMail.pl on the same domain (my feedback form), I get an email back in one minute (I'm using Perl 5.006001). The script is starting to 'talk' to the mail server, because when I try to get the server 'banner', it gives me:
"mailservername.net ESMTP Exim 4.20 #1 Sat, 04 Oct 2003 01:28:37 -0400 "
Are there any methods to debug this script ? To somehow see what the email server is doing, any way to get 'echos' displayed, or any modules to add to give me debug information (The "error_log" file is empty, btw) Are there any issues with the code that could make it not work ?
Peter
In reply to Net::SMTP and debugging ? by peterr
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |