I want to send mail using perl,the following is my code. There are not any error or warning when the program run. But i can not receive the mail. Please help me ! thanks!
use Net::SMTP; $smtp = Net::SMTP->new('192.168.1.169') or die "Can not connect to the mail server : $! \n";
First thing I would do is change this line to
$smtp = Net::SMTP->new('192.168.1.169' , Debug => 1)
or die "Can not connect to the mail server : $! \n";This allows you to see the responses from the smtp server, which will help track this down.
$smtp->mail('[EMAIL PROTECTED]');
$smtp->to('[EMAIL PROTECTED]');
$smtp->data();
$smtp->datasend("To: postmaster\n");
Are you postmaster?
$smtp->datasend("\n");
$smtp->datasend("A simple test message\n");
$smtp->dataend();
$smtp->quit;
-Mark
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
