Email Reminder Cronjob

sapiens110 wrote on Sunday, December 28, 2014:

Merry Christmas Everyone!

I don’t think it’s possible now for patient reminders to be sent automatically. Has anyone already worked on this? Say every night at 00:00, all reminders are processed and sent without the need of an admin doing so.

arnabnaha wrote on Sunday, December 28, 2014:

yes it is possible…using it for a year now…

  1. go to databse and fill up the automatic notification table with the message you need to send to the patients as EMAIL

  2. Set up a mail server like mercury.

  3. Setup scheduled task (windows) or similar thing in Linux which will run the script cron_email_notification.php in the openemr/modules/sms_email_reminders at a specific time of the day say at 00;00

  4. setup an appointment for the patient and your task scheduler will run the script at the time specified

  5. the script will automatically send the message to the patient which you have prefilled in the automatic notification table in database via the mercury mail

FOR Email setup read this - http://openemr.sourceforge.net/wiki/index.php/Sms_and_Email_Notification_Howtos

For Mercury Setup Read this
http://openemr.sourceforge.net/wiki/index.php/Mercury_Mail_Configuration_in_Windows

If you want the Email sent to the patient to look a bit professional, then I have an attachment which I can share, which can be copied, pasted and edited in the automatic_notification table as per your clinic need for the email to look good (this table, can decode the html tags and codes, so makes the look of email great.)

Thanks and Regards
Dr. Arnab Naha

sapiens110 wrote on Tuesday, January 13, 2015:

Hi Arnab

Finally got time to play with it. Your solution works so thanks. For future versions, it might be a good idea to have a setting in globals.

Anyway, it would be greatly appreciated if you could share the attachment you talked about.

Thanks!