Re: Mail problem

From: Date: Sat, 01 Jul 2000 22:01:17 +0000
Subject: Re: Mail problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-4303@lists.php.net to get a copy of this message
In article <026801bfdfda$2b4a7df0$01c8c8c8@production.ibcserver>, php_list@ibcnetwork.net ("Chris") wrote: > Is the webserver trying to send email faster than sendmail can handle it? Yes. > Should I be inserting a time delay before each mail command? Yes. A long one. > Or is there a better way to do this: > > $strsql = "SELECT Name, Email FROM db"; > $result = mysql_db_query("userdb",$strsql); > $numrows = mysql_num_rows($result); > for($i=0;$i<$numrows;++$i) > { > blah, blah > > mail($mailto, $mailsubject, $mailmessage, $mailfrom); > } Yes, if they are all getting the same message, just Bcc: them all, and do one giant send. Your mail server may cut off Bcc: after 50 users or something though. You'll have to play with it. Or, Manuel Lemos' mail class (or other similar solution) will spew things directly at the mail server port much, much faster, and probably with fewer limitations than sendmail. Using PHP for this is not really the Right Thing (tm). Better to have a real mailing list which was designed for high-volume email. -- Richard Lynch | If this was worth $$$ to you, buy a CD US Customer Support Director | from one of the artists listed here: Zend Technologies USA | http://www.L-I-E.com/artists.htm http://www.zend.com | (this has nothing to do with Zend, duh!)

« previous php.general (#4303) next »