Hello,
On 09/27/2004 01:22 PM, Jeffrey Silverman wrote:[color=blue]
> I tried using the PHP mail() function and it *seemed* to work, almost.
> That is to say, I had added all the names to a long list of Bcc: headers,
> and put the extra Bcc: headers in the extra headers argument to the PHP
> mail() function. This seemed to work, in that it seemed like everyone got
> the email; however, the mail() function came back with a failure error.
>
> I thought about it a bit and researched a little and found that maybe a
> really long Bcc: list is not the best idea, for spam reasons (my
> message is more likely to be marked as spam) and for other similar
> reasons. So I was considering looping through the 500 email addresses and
> doing a separate mail() for each, but putting each email address in the
> To: field. This sounds like a lot of overhead, though, and I'm afraid of
> this thing timing out or crapping out or Something Bad(TM) happening.
>
> I am currently using Sendmail, Linux (Red Hat 9), Apache 1.3.x, and PHP
> 4.3.8.[/color]
You are right. Putting all recipients in Bcc: is not a good idea because
like you noted, some mailbox providers like Hotmail will tag the
messages as junk when the recipient address does not come in a visible
header (To: or Ccc:). Some ISP may also limit the number of recipients
per message that is queued.
Since you use sendmail and your messages are not that urgent, my
suggestion is to configure it to queue all the messages and deliver them
later when the queue is processed next time. This way sendmail will not
hold your PHP script waiting for each delivery.
If you are not aware how to do that, you may want to try this class for
composing and sending e-mail messages that comes with a subclass
specialized in deliveryng via sendmail that provides an option that lets
you tell to defer the delivery of your messages.
If you are not personalizing the messages (which I strongly advise for
efficiency reasons) you may also want to tell the class to cache your
message bodies so it does not waste time rebuilding the message body for
each recipient. You can still personalize the message headers like the
To: header as you need.
http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html