Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

php script [mail, issues?]

Options
  • 06-07-2009 2:46pm
    #1
    Registered Users Posts: 8,070 ✭✭✭


    Hey,
    I need to setup a service, where by upon validation by a client, it will fire of emails to that particular recipient.

    EG*, 30k users,
    client downloads csv,
    client uploads csv ,[marking 1 for approved, 2 for not approved]

    everyone marked 1 will receive a confirmation email.
    My worry is that, if i'm looking at something like 1-2k in the first few runs, what if the script haults, also i think there is a 30-60 script timeout as default in php.ini


    would it be more robust to upload those recipients to another mysql table and run cron jobs on those tables?
    or is it safe to use set_time_limit(0)?


    Thanks.


    *deduced to use this weak algorithm due to client....


Comments

  • Registered Users Posts: 3,140 ✭✭✭ocallagh


    The script execution time is not the problem as you say you can remove that, it's the load your mail server/host can handle. With only 30k though you can easily do it in one call to the script so you can avoid the cron/mysql. Just stick in a sleep every hundred emails or so.

    Although saying that, I'd prefer to have it done through mysql and have a flag to indicate the mail was sent succesfully.


  • Registered Users Posts: 3,140 ✭✭✭ocallagh


    Also you could just chuck the 30k at this in one go and let it worry about it: http://pear.php.net/package/Mail_Queue/


Advertisement