Dirk Bremer wrote:
I have a need to send multiple email messages within a single instance of a
program. I have a problem where the first composed email message is sent
(and received) okay, while the subsequent messages are not. The code is
similar to this:
use Net::SMTP;
$smtp = Net::SMTP->new('mailhost');
$smtp->mail($ENV{USER});
# Loop over the following for each message
$smtp->to('postmaster');
$smtp->data();
$smtp->datasend("To: postmaster\n");
$smtp->datasend("\n");
$smtp->datasend("A simple test message\n");
$smtp->dataend();
$smtp->quit;
Note the loop as shown above. What am I doing wrong? Do I need to create a
new SMTP object for each message?
--------------------------------
Creating a new object was the only way I could make it work. If your sending
the exact same message to a number of recipients, the To parameter will
accept an array of addresses.
- Chris
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs