on 15/06/02 5:32 AM, Pawel ([EMAIL PROTECTED]) wrote:

> You're using something like mysql_fetch_array and not querying the db 120
> times I hope.

of course! :)


> The time your MTA takes to process the emails has nothing to do with this.
> 120 calls to mail() should not time out, maybe you have a complicated
> regexp for fixing that name in the emails
> what's the body of your while() loop ?

nothing too complex at all:

while($myrow = mysql_fetch_array($result))
    {
    $to = $myrow["email"];
    $name = $myrow["name"];
                
    $this_message = eregi_replace('#name#',$name,$message);
    $this_message = stripslashes($this_message);
    $this_message .= $email_footer;
           
    $headers = "From: mailinglist@{$domain_name}";
                
    mail($to, $subject, $this_message.$email_footer, $headers);
    }    


> putting 120 email addresses in one bcc will surely get your email
> classified as spam

good point


> you could try adding a column in your db that will reflect the last time
> you've sent an email to that person. Then you could just append "LIMIT 40"
> to your select query, but updating the column requires a separate query (1
> update per email if you want to know exactly how got the email and who didn't)

I think i'll write a simple log file for each send-out

Based on everyone's advice, I'm going to break the sending process into
batches of 10 or 20 rows using a redirect, encorporate a log (so that I can
remove bad address' that may slow it down), and then see where to go from
there.


Thanks for everyone's help.


Justin French


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

Reply via email to