You can set a Bcc header by using the 'Bcc' key in the call to MIME::Lite->new. And you can give it multiple addresses by passing a reference to an array of addresses. You might not be able to send 4,000 messages in one go, but you'll certainly be able to send them at a better rate than your current one at a time.

During this period when someone visits our site, a visitor will occasionally get an internal server error which I'm think is related somehow to the mail/sendmail program

Maybe you should consider using a mail server that isn't also your web server.

Your require "Lite.pm" is rather non-standard. You should really replace that with use MIME::Lite. There are a few other unusual pieces of code in there, like the way you unnecessarily read the whole address file into memory. The whole program would benefit from being reviewed by a more expert Perl programmer.

And finally, more and more people are treating pure-HTML email as spam. For example, I never get to see any mail message that doesn't have a plain text version attached. If your message isn't spam then you might consider making it look less like spam.

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg


In reply to Re: Sending out a mass email to our customers by davorg
in thread Sending out a mass email to our customers by Anonymous Monk

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.