Jump to content

Recommended Posts

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 by Dude22
Link to comment
https://forums.phpfreaks.com/topic/276684-delay-the-sending-of-email-in-php/
Share on other sites

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.

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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.