austin6118 Posted May 3, 2009 Share Posted May 3, 2009 I have wrote a program using PHP and MYSQL and I created a form that sets the year month and day. How do I get an email to send on this specific date? I don't know if this is possible or how to go about it. I have an email sent once the user has registered but that about it. I need a reminder email to be sent once they specify the date for it to be sent on. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/156717-how-to-send-an-e-mail-on-a-specific-date/ Share on other sites More sharing options...
Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 Best method would be to store the date in the DB and use a CRON PHP file handle it. I would have CRON run once per day? Quote Link to comment https://forums.phpfreaks.com/topic/156717-how-to-send-an-e-mail-on-a-specific-date/#findComment-825236 Share on other sites More sharing options...
austin6118 Posted May 3, 2009 Author Share Posted May 3, 2009 Sorry I'm not too familiar with CRON files. What's the first step I would need to take going about this. I have the date get sent to my database but its gets updated with no delimiters like if the following were selected.. YEAR:2009 MONTH:06 DAY:22 it gets submitted to the database like "20090622" Quote Link to comment https://forums.phpfreaks.com/topic/156717-how-to-send-an-e-mail-on-a-specific-date/#findComment-825239 Share on other sites More sharing options...
Ken2k7 Posted May 3, 2009 Share Posted May 3, 2009 The first step is to create the PHP file. As for the date, you should store it as either a time or a datetime. If you have it like that, it's really tedious to query the DB. So I guess the first step is to fix your date. Quote Link to comment https://forums.phpfreaks.com/topic/156717-how-to-send-an-e-mail-on-a-specific-date/#findComment-825242 Share on other sites More sharing options...
austin6118 Posted May 4, 2009 Author Share Posted May 4, 2009 Okay I have changed it so that when the date gets submitted to the database it now goes in the format of 2009-06-22. I am using cPanelX and have found the cron utlity. It gives me the options on when I want to run it but also gives me a line that says - Command to run: - what kind of information do I have to enter in that line? Quote Link to comment https://forums.phpfreaks.com/topic/156717-how-to-send-an-e-mail-on-a-specific-date/#findComment-825249 Share on other sites More sharing options...
Ken2k7 Posted May 4, 2009 Share Posted May 4, 2009 Learn to Google! http://en.wikipedia.org/wiki/Cron Quote Link to comment https://forums.phpfreaks.com/topic/156717-how-to-send-an-e-mail-on-a-specific-date/#findComment-825254 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.