Yukio has asked for the wisdom of the Perl Monks concerning the following question:

I have a working script that sends several different emails using Mail::Mailer. The script works perfectly fine, but I suspect that I'm causing trouble down the line for my smtp provider because the script is sending the emails one at a time and the delay is alarming me. As far as I can tell from the documentation, the only way to send any email is by openning a new connection to the server, populating the new message and closing the connection to send it on its way. My desktop email client, of course, works by establishing the connection, sending a bundle of messages before closing the connection and it irks me that I figure out how to do this in Perl. Does anyone have any experience or insights?

Replies are listed 'Best First'.
Re: Sending multiple but different emails
by lhoward (Vicar) on Sep 07, 2001 at 18:44 UTC
    Use a module like Net::SMTP to manage the connection to your mail server yourself. That way you can send multiple messages in one connection without any problems.
Re: Sending multiple but different emails
by lachoy (Parson) on Sep 07, 2001 at 19:14 UTC
    If you have a whole bunch of messages, Mail::Bulkmail might be helpful, particularly if they're of the mail merge sort. (And no, that doesn't necessarily mean spam. Or so I've heard.)

    Chris
    M-x auto-bs-mode