Page 1 of 1

EMAIL REMINDER

Posted: Thu Jun 18, 2009 8:58 am
by nachoman316
Hi folks hope all are well.

At the moment I am trying to create an email reminder that will be sent out automatically 2 days before a specific event to people who have registered their email address.

Any Ideas as how to get started on this?

Re: EMAIL REMINDER

Posted: Thu Jun 18, 2009 9:02 am
by jayshields
You can either use a cron job, or find some sort of event which happens often (in your case once per day will be enough) and use it as a trigger.

For example, every time someone logs in, check the database for email reminders that need to be sent today, and if there is any then send them.

Re: EMAIL REMINDER

Posted: Thu Jun 18, 2009 9:35 am
by nachoman316
Thanks for the swift reply thats great.

Could I set up the php script so it sends the reminder 2days before the event if I set the cron job to execute every day.

Im just having trouble trying to execute the php query. Can you tell the query to send an email 2 days before an event date?

If so do you have a mock example it would be greatly appreciated.

Thanks again.

Re: EMAIL REMINDER

Posted: Thu Jun 18, 2009 9:56 am
by mattpointblank
Look up the date of the event, compare it to the current date, if it's two days or less, send the email.