On Sat, 2 Mar 2002, Andrey Hristov wrote:

> check you php.ini if you need to change sendmail -t -i to something other.

I think the problem's fixed itself now! About 45 minutes after I
started running 10 scripts in parallel, the whole show went berserk and
all the scripts begain sending a message a second, so that sendmail was
handling 10 messages/second and load average hit 3.5. It must have been a
network related problem but it's all running fine now with 1 message a
second going out from the original script.

cheers,

Andy

> ----- Original Message -----
> From: "andy thomas" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, March 02, 2002 11:04 AM
> Subject: [PHP] Bizarre mail() problem
>
>
> > I have written a script to do some massmailing - it extracts an email
> > address from a MySQL database and uses it to send a text file as a mail
> > message. It works but there is a 75 second delay between each message
> > being sent out!
> >
> > This is baffling - there are no delays built into the script and nothing
> > obvious in our sendmail configuration. As I've got over 38000 addresses to
> > mail out to, this is a problem - I've got round it for now by running 10
> > scripts simultaneously, each handling 1000 addresses and this has got mail
> > moving.
> >
> > The mail() function seems to call sendmail -t -i. This just sits there for
> > 75 seconds, then sends a message and then waits for another 75 seconds.
> > Surely this should not happen?
> >
> > Here's the relevant parts of the script - the email address is in column
> > 15 of the MySQL table, so it just extracts field 14 for the email address
> > data:
> >
> > $msg_txt="message.txt";
> >
> > mysql_connect("localhost",$mysql_user,$mysql_pwd);
> > $query="select * from $table";
> > $result=mysql($dbname, $query);
> > $rows=mysql_numrows($result);
> >
> > $r=0;
> > $f=14;
> > while ($r < $rows ) {
> >         $address=mysql_result($result,$r,$f);
> >         mail("$address","$subject","$message","From:$MailFromAddress");
> >         $r++;
> >         }
> >
> >
> > Any suggestions or pointers to where I'm going wrong will be warmly
> > received.
> >
> > Andy
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to