Dude22 Posted April 8, 2013 Share Posted April 8, 2013 (edited) Hi everyone, I am working on a site, that will allow dentist, doctors and the like to set up automated E-Mail reminders for their clients, instead of having to call them. I am relatively comfortable in php. But I have never done anything with E-Mail before... My main question has to do with sending E-Mail on a specific date. I have seen a few ways to do it, but nothing that really seems desirable. One way, seemed to require that someone be using the site, to send the E-mail. Ie: if an E- mail is supposed to be sent at 6, but no one logs on until 7:30. Then that E-mail won't be sent until 7:30. The other method that I have seen used cron, this second method, seems superior but much more complicated. What method should I use??? Any, hits/tips to get me on the right direction would be appreciated! Thanks, Josh Edited April 8, 2013 by Dude22 Quote Link to comment https://forums.phpfreaks.com/topic/276684-delay-the-sending-of-email-in-php/ Share on other sites More sharing options...
requinix Posted April 8, 2013 Share Posted April 8, 2013 Cron. It's not that complicated really: you add an entry to cron telling it to run a script (from the command line) every once in a while, like every five minutes, and that script does whatever it wants to do. Like process all notifications it should send out at that time. Quote Link to comment https://forums.phpfreaks.com/topic/276684-delay-the-sending-of-email-in-php/#findComment-1423541 Share on other sites More sharing options...
Dude22 Posted April 9, 2013 Author Share Posted April 9, 2013 Ok, I have never used cron before, and am not really sure how it works, How do you interface between php, or mysql and cron??? Quote Link to comment https://forums.phpfreaks.com/topic/276684-delay-the-sending-of-email-in-php/#findComment-1423722 Share on other sites More sharing options...
requinix Posted April 9, 2013 Share Posted April 9, 2013 Cron runs commands at certain times. It's very flexible in how it does so but that's it in a nutshell. Then you just make a PHP script. You can't use web-specific stuff like the REMOTE_ADDR, and the DOCUMENT_ROOT might not be what you expect, but it's all just PHP. Quote Link to comment https://forums.phpfreaks.com/topic/276684-delay-the-sending-of-email-in-php/#findComment-1423754 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.