Scott,
I haven't been following this thread at all, but you don't have to open a
new connection each email you send. Just don't close the connection after
you finish sending the data (in other words, do something like this:-)
$smtp = Net::SMTP->new($SMTP_SERVER);
foreach $recipient (@LIST){
# Process the body of the email (or whatever else
will be different per recipient)
$smtp->mail($from_address);
$smtp->to("$recipient");
$smtp->data();
$smtp->datasend("To: $recipient\n");
$smtp->datasend("From: $from_address\n");
$smtp->datasend("Return-Path: $from_address\n");
$smtp->datasend("Reply-To: $reply_to_address\n");
$smtp->datasend("Subject: $email_subject\n\n");
$smtp->datasend("$body");
$smtp->datasend(".\n\n");
}
$smtp->quit;
It won't be GREAT, but it'll be much better than making several connections
to the SMTP server..
Regards,
Kevin D. Dearing
-----Original Message-----
From: Scott Phelps [SMTP:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 3:36 PM
To: Perl-Win32-Web; Mike King
Subject: RE: Net::SMTP under heavy use
Thanks for the reply!
An earlier search of mine found: Mail-Bulkmail
But it doesn't look capable of sending a different message to each
recipient. Data pulled from the text file will be used to create a
message
body that is unique to each address.
An earlier test showed that with Net::SMTP delivering 5 messages
took about
4 seconds. I'm sure this is caused by the overhead of opening a new
connection for each message. I guess if all else fails I could start
from
scratch, but I would love an easier way!
And in case any of you are curious of my intentions, this isn't
SPAM.
ScottP
-----Original Message-----
From: Mike King [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 12, 2001 2:59 PM
To: Scott Phelps
Subject: Re: Net::SMTP under heavy use
There is a bulk mailer module available on CPAN, which is designed
specifically to do what you want. It does it within one SMTP
conversation,
which makes it significantly faster.
Cheers
Mike
At 01:37 PM 3/12/01 -0500, you wrote:
>
>How does Net::SMTP stand up to large deliveries? I've got a project
that
>will need to deliver several hundred to several thousand messages
based on
>data stored in large text files. I would love to use Perl but have
only
used
>Net::SMTP for simple form-mailer type stuff. Anybody have
experience doing
>large delivery batches with this module?
>
>______________________________________
>splehP ttocS
>rotartsinimdA smetsyS TN
>secivreS tenretnI renroKbeW
>moc.renrokbew@pttocs
>moc.renrokbew.www
>
>$a="@ARGV";while($a){$a=~s/(.$)//;$b=$b.$1;}print "$b\n";
>______________________________________
>
>
>
>
>
>_______________________________________________
>Perl-Win32-Web mailing list
>[EMAIL PROTECTED]
>http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web