very interesting article!
i just wrote my own open source newsletter, using your smtp class.
as sending with smtp is the only way to handle bouncemails, it will also cost some more time to send.
i found that sending to 100k aresses or more will take a very longt time, at least when i split it into small packages like 25 mails per minute.
a good solution would be adding a cpu load check here too, and stop the queue when cpu load is too high.
is this class available from you? does it work without using 'top'?
thanks you, vizzy
|2007-10-12 00:48:26 - In reply to message 1 from VAugustin|
|Using a SMTP server to relay messages is not the only way to handle bounces.|
The PHPClasses site handles bounces and just uses qmail to drop messages in the queue.
I use the MIME message class to set the return address for bouncing messages. It looks at the Return-Path header and translates it to whatever is the way to set the bounce address for the actual delivery method, in my case qmail.
But that package provides means to set the return address the same way using other delivery methods like using the mail() function, sendmail or compatible MTA, Microsoft Exchange pickup folder, or even SMTP relay.
As for the CPU load, I have a class to check that but currently it only works under Linux. It checks the /proc/loadavg virtual file to figure the current CPU load. When it is too high, the newsletter delivery script rests for 1 minute before it checks the CPU load again.