Using Fedora Core 20. Perl v5.18.2. Compiled Jan 14.
When I say "crash", I simply mean it halts the program to sent the email giving the error
"Mon Aug 18 14:44:47 2014 bb.cgi: Can't call method "mail" on an undefined value at bb.cgi line 85."
Even though my $INVALID is defined as "duffhost.duffhost.com".
If I add anything after this code , it does not run.
If I replace $INVALID with $GATEWAY (a real address) it works fine.
If you put two together, the working one first, it runs, sends the first email and then halts.If you put two together, the working one last, it halts.
---------
$smtp = Net::SMTP->new("$INVALID", Debug => 3 );
$smtp->mail("$FROM");
$smtp->to("$EMAIL");
$smtp->cc("$USEREMAIL");
$smtp->data();
$smtp->datasend("From: $FROM \n");
$smtp->datasend("To: $EMAIL \n");
$smtp->datasend("Cc: $USEREMAIL\n");
$smtp->datasend("Subject: $SUBJECT \n");
$smtp->datasend("\n");
$smtp->datasend("$MAILTEXT \n");
$smtp->datasend("\n");
$smtp->dataend();
$smtp->quit;
In reply to Re^2: Net::SMTP halts script
by Anonymous Monk
in thread Net::SMTP halts script
by nperrins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |