Re: managing bounced mail

From: Date: Fri, 07 Sep 2001 16:38:15 +0000
Subject: Re: managing bounced mail
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-9235@lists.php.net to get a copy of this message
Hello P.Agenbag, On 22-Aug-01 17:59:17, you wrote: >Hi, this problem isn't really Windows specific... >I have a client on one of my webservers who is causing me great >headaches. He wrote php mail function that reads approx 17 000 e-mail >addresses out of a mysql table, and then mails them all a standard >newsletter. One message for each? >Firstly, the page bombs out ( no wonder really...) but before it does, >it sends out as many mails as it can loop through in the 30s. I have This is generally a bad idea to do from a Web script. It may take tens of minutes to deliver all of them to the local mail server just to queue the messages, depending on how you do it. >checked the script, and he does add headers,; reply-to, return-path, >from etc., yet, when the mail he sends starts to bounce, they all end up >in the "root" account mailbox, as sendmail sees at as mail sent by users >nobody@mydomain. For some reason, the Return-path header is ignored. I >would really like to route these errors to his mailbox so he can handle >the bouncers. Furthermore, concerning this problem of the bulk mail. The return-path header is generated by the mail server to which you relay you messages. So, whatever you put there is overriden by the mail server. If you only use Windows, the only way I know to set the return-path is to send the messages directly to a SMTP server. You may want to check these PHP classes that can be used in combination to set the Return-Path header as you want: http://phpclasses.UpperDesign.com/browse.html/package/9 http://phpclasses.UpperDesign.com/browse.html/package/14 >I've had several people tell me that PHP is not the right way to send >bulk mail, yet, I know of no other way to read addresses from a mysql >table and send it as easily as with PHP. I was just wondering if there >is another way of doing it with PHP so my server won't get bombarded >with all these sendmail calls, ie, some way of pausing the sending >process after every nth mail so sendmail can catch up. I've heard people >talk about "sending the process to the background", but that sounds way >too loose a term... What you need to do is to use PHP standalone CGI executable and run a PHP script that will do the delivery. Anyway, if you were using Unix, I would recommend a ezmlm/qmail solution if all users are going to get the same message. Since you are running Windows, I don't know what would be the best tools to use, because the simple solution of of relaying that many messages to a SMTP server is not very efficient. Regards, Manuel Lemos Web Programming Components using PHP Classes. Look at: http://phpclasses.UpperDesign.com/?user=mlemos@acm.org -- E-mail: mlemos@acm.org URL: http://www.mlemos.e-na.net/ PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp --

« previous php.windows (#9235) next »