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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

php script [mail, issues?]

  • 06-07-2009 1: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