You really need the right tool for the job. With respect to mass mailings (hopefully we're talking about opt-in mailings), MIME::Lite is a fish out of water, and Mail::Bulkmail is a great white shark. ;)

The POD for Mail::Bulkmail has this to say:

Mail::Bulkmail gives a fairly complete set of tools for managing mass-mailing lists. I initially wrote it because the tools I was using at the time were just too damn slow for mailing out to thousands of recipients. I keep working on it because it's reasonably popular and I enjoy it.

In a nutshell, it allows you to rapidly transmit a message to a mailing list by zipping out the information to them via an SMTP relay (your own, of course). Subclasses provide the ability to use mail merges, dynamic messages, and anything else you can think of.

And the Synopsis shows the following simple code example:

use Mail::Bulkmail /path/to/conf.file my $bulk = Mail::Bulkmail->new( "LIST" => "~/my.list.txt", "From" => '"Jim Thomason"<jim@jimandkoka.com>', "Subject" => "This is a test message", "Message" => "Here is my test message" ) || die Mail::Bulkmail->error(); $bulk->bulkmail() || die $bulk->error;

Hope this helps! Of course I only answered this question because I believe that your 500 recipients all want you sending them messages. If you're spamming people, let the shame of 27000 perlmonks rest on your shoulders. ;)


Dave


In reply to Re: Most efficient way to send mass email? by davido
in thread Most efficient way to send mass email? by JaredHess

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.