Forum Moderators: coopster

Message Too Old, No Replies

remind functionality

         

kristof_v

2:21 pm on Dec 1, 2006 (gmt 0)

10+ Year Member



hi

a user is able to set a date to remind him about something through an email.
now i have stored the datetime value in the mysql database but how can i make php automatically send an email when that date has come?

I have something in mind though,
for example:
I create a php that gets that users remind info from the database.
it checks which dates are due and it sends the email with the info for all the dates that are due.

then I install a little batch on the computer of the client that loads this script daily to do the reminding.

but maybe there is an easier way?

justageek

2:59 pm on Dec 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use worker php scripts that just sit in an infinite loop and check a db for something to do.

You could do the same thing. Just make a loop that checks the date and if it is time go ahead and send the email. I just add a sleep() with however long I want the script to do nothing into the loop so even though it is running it is not using much resources.

JAG

kristof_v

3:03 pm on Dec 1, 2006 (gmt 0)

10+ Year Member



that would be a better solution indeed.
no need to install anything on the client side etc...

thx!