I need to create a web application using php, I had many users having appointments on different days and time. What I need is to send emails say 1 day, 6 hours and 1 hour before their respective appointments, cron job seems to be the option but how to run script at the specific times(when email has to be sent) for every user?
+2
A:
You would create a script that determines if any emails need to be sent, then call that from cron every hour (or minute or whatever).
Scott Saunders
2010-04-07 13:55:49
if at some time it happens that 100 of email need to be send. Will that cause the problem with the performance of the website?
nik
2010-04-08 09:32:32
You should be able to send a few hundred emails without too much trouble. Follow the normal guidelines for optimizing your script and make sure your email server can handle it.
Scott Saunders
2010-04-08 13:46:03