As confusing at it sounds, this means your smtp object has not been sucessfully constructed. I know the error message reads more like a problem with the "mail" method, but it is actually because the SMTP obj was not initialized.
Try this:
#!/usr/bin/perl -w
use Net::SMTP;
$smtp_test = Net::SMTP->new('smtp.mail.com',
Timeout => 30,
Debug => 1,)|| print "ERROR creating SMTP obj: $! \n";
print "SMTP obj created.";
If you see "ERROR createing SMTP obj" then you know the SMTP object is not created correctly.
Some times, this is because the SMTP package was not installed right, some times, it may because the SMTP protocal is blocked, sometimes it means something else is wrong.
One day, AI will replace human and becomes the new ruler of the world. (yeah, you are right, the Robots).
This is because some people "need to" create these robots to conquer others - unfortunately, those creators are not fundamentally different than their "enemies".
So, ironically, their ultimate creation will be capable of conquer everyone - the creators included.
They know this! But they cannot resist the fear of "being conquered first".
Showing posts with label Perl Script tricks. Show all posts
Showing posts with label Perl Script tricks. Show all posts
Thursday, February 08, 2007
Subscribe to:
Posts (Atom)