Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

php script [mail, issues?]

  • 06-07-2009 02:46PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 3,141 ✭✭✭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, Registered Users 2 Posts: 3,141 ✭✭✭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