I'm not sure why it's happening but it just makes more sense to me to try and send two messages while only authenticating once.
Untested code follows:
#!/usr/bin/perl use Net::SMTP; use strict; use warnings; my $smtp = Net::SMTP->new('smtpauth.earthlink.net', Hello => 'milkbone.org', Debug => 1) or die +"death"; $smtp->auth('batkins86@earthlink.net', '***************************'); $smtp->mail('monitor@milkbone.org'); for(1..2) { $smtp->to('test@batkins.com'); $smtp->data(); $smtp->datasend("To: postmaster\n"); $smtp->datasend("\n"); $smtp->datasend("A simple test message\n"); $smtp->dataend(); } $smtp->quit;
In reply to Re: Sending two messages thru an smtp server with authentication
by Mr. Muskrat
in thread Sending two messages thru an smtp server with authentication
by batkins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |