Hello,
On 11/13/2003 07:47 AM, Nicolas wrote:
I have programmed an application to manage newsletters in PHP. I send the
mails using smtp, but when there are more than 500 subscribers and when the
mails (in html) are too big, it is really slow.
What can I do gain speed ?
Sending mailings via SMTP is the slowest method of all because you need
to establish an TCP connection with a relay server which just injects
the messages in the queue to be resent again.
If you have a local mailer in your machine like
sendmail/qmail/postfix/etc... it is better to invoke the local mailer
program which is just what the mail() function does under Linux/Unix.
Depending on the type of local mailer that you use, you can try to
optimize the queue injection further for mass mailing, using the right
switches.
In that case you may want to try this class for composing and sending
messages that comes with sub-classes specialized in the delivery of
messages with different local mailers.
The class also makes it easy to compose messages in HTML properly
according to the RFC recommendations. If your message bodies do need to
be personalized for each user, the class can optimize the message
composing further.
http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/