in reply to Sending two messages thru an smtp server with authentication
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Sending two messages thru an smtp server with authentication
by batkins (Chaplain) on Jul 11, 2003 at 16:37 UTC | |
by Mr. Muskrat (Canon) on Jul 11, 2003 at 16:54 UTC |