Hello,

On 10/23/2003 01:35 AM, John Christopher wrote:
I am writing a script that will query a database
table for some statistical information, and then
email it (daily, weekly, and monthly) to a list of
subscribers.  I don't know ahead of time how many
persons will be subscribed to receive the info
(it could be 20 persons or 2000 or more).  Email
addresses can be added to or deleted from the
subscriber list at any time.

If I am not mistaken, MTAs have a limit on how
many recipients can be specified on the To: line
of an email message.  What is the limit, or does
it depend on the MTA you're using (sendmail, qmail,
etc), or other factors?  If there is such a limit,
then what is the best way to send the message to
each recipient?

That is something that is configured intentionally by hosting that don't want their clients to do bulk mailings like you want to do.


So, I think you should ask your hosting company if you can do what you want in your current hosting plan. Some times they provide you better alternatives if you pay more. After all you will be consuming more bandwidth and CPU resources of the server.

Anyway, to send that many messages, I do not recomend personalization of the message body because it will make PHP spend a lot more time composing the message to be sent.

In the past it used to be good idea to send just a single message with all recipients in Bcc: . However that started to be a problem since services like Hotmail started considering to be spam messages that did not have the recipients address in To: or Cc: headers.

The alternative is to send separate messages to different users, personalizing just the To: header. In that case, you may want to try this class that is optimized to send bulk mailing by caching message bodies. It also lets you compose HTML mail with images and alternative text parts for non-HTML capable mail programs still read the messages.

http://www.phpclasses.org/mimemessage

There are other optimization tips, but I would need to know what is the mailer system (sendmail, qmail, postfix, remote SMTP, etc...) that your hosting uses, so I can make an adequate recomendation.


--


Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to