title: How to send e-mails on users defined date and time with PHP?
body: <p>I have an agenda system where you can schedule events and appointments and choose a date and an hour for each appointment/event.</p>
  
  <p>The user will choose to receive a reminder to its appointment, the reminder can be 5 minutes before the event starts, 1 hour before the event starts, 2 days before the event starts, etc...</p>
  
  <p>So, if an user's appointment is scheduled to Today at 10:00 PM and the reminder is "10m before", I'll need to make php send an e-mail to the user at 09:50 PM. For now, I'll have to make reminders to be sent 5m, 10m, 30m, 1h, 2h, 5h, 12h, 1d and 2d before the event starts. </p>
  
  <p>How can I make PHP send e-mails on users defined time?</p>
  
  <p>Thanks a lot.</p>