Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004

    php doesnt send all mails !!!

    i have a php script (newsletter) and it is in the nuke web system,
    i have about 1000 member or mails.

    when i send to the news letter members , the page takes a lot of time to load , and after 2 minutes nearly it stops , and the browser gives page unavailable.

    i found that nearly 200 mails have been actually sent , but the rest was not fast enought to be sent before the termination of that action file.

    After doing some inverstigation in the php code , i found that the whole time is spent in the line
    mail("$sendto","newsletter",....) i mean the mail function... and this line is in a loop .

    what possibly could let the mail function take this long time , i ll appreciate any answer from anybody who runned similar problem.

  2. #2
    Join Date
    Sep 2004
    Chicago, IL
    in php.chf set the timeout or execution time to a much higher number; the other work around is to copy the addresses to a temp table and delete them from the temp table as they get sent.
    Ben Lenard, MS, MBA
    TechMinds 4 Hire, Inc - (866) 214-1285 x 2001

  3. #3
    You might also want to consider having it process the emails in batches along the lines that blenard suggested. IE create a temp table, copy over say 100 addresses, send out the emails, delete the temp table, copy over the next 100 address, etc.

    Also look into sorting those addresses and sending one email to all the email addresses in one domain. IE all the's, all's, etc. This way, ONE email message goes out, uses fewer resources both on your end and on the receiving mail server end. They will thank you. Though if your email message that gets sent out is personalized, then you're SOL and will have to send out each email seperately.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts