Justtechjobs.com Find a programming school near you






Online Campus Both


php-general | 2000071

[PHP] Re: [PHP-GENERAL] Mail problem From: Richard Lynch (richard <email protected>)
Date: 07/01/00

In article <026801bfdfda$2b4a7df0$01c8c8c8 <email protected>>,
php_list <email protected> ("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!)

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>