Windows Cron Email Function Check

arnabnaha wrote on Tuesday, September 16, 2014:

Hii…
was testing through the cron function in windows. Steps done:

  1. Set up scheduled task to call the cron page at a certain point of time in a day (say at 9 PM)
  2. This sends email successfully to patients having appointments in the next 24 hrs automatically to the email address in the patient’s demographics. (The email sending feature is absolutely perfect and tuned by using mercury mail)
  3. before sending mail, I did setup the automatic_notification table in the database and wrote the body of the message/email in the table itself.

screenshot of the database automatic_notification table:

![alternate text] (http://nahahealthclinic.no-ip.org/public/database_auto_notification.jpg)

LINK FOR ABOVE PIC: http://nahahealthclinic.no-ip.org/public/database_auto_notification.jpg

  1. I have added enough space and paragraphs in the automatic_notification table in the database, but when the email appears in my gmail inbox, it shows like this:

![alternate text] (http://nahahealthclinic.no-ip.org/public/mail_gmail.jpg)

LINK FOR ABOVE PIC: http://nahahealthclinic.no-ip.org/public/mail_gmail.jpg

Is this a bug?? help needed so that it looks good in the final email which reaches the patient.

arnabnaha wrote on Tuesday, September 16, 2014:

The pic seems to narrow down itself, Please visit the link supplied to see the full screenshots.

cmswest wrote on Tuesday, September 16, 2014:

http://sourceforge.net/p/openemr/discussion/202505/thread/dd82b356/

seems like ed and md are discussing a workaround

mdsupport wrote on Wednesday, September 17, 2014:

If paragraphs and spacing is the only issue, you could look at adding php encoding for lines. Make sure the cron job translates it correctly.

As suggested earlier, you can also use any html editor to create your message. Simple html body is attached for starters. It may contain some tags that are not standard but it will give you some idea. Once you are satisfied with the layout and appearance, copy and paste raw html code in the table and test.

Have fun.

arnabnaha wrote on Wednesday, September 17, 2014:

Thank you MD support, I was unable to test because the email function doesnt seem to work in cronjob and batch com. have made a new topic regarding that issue in this developer forum.

arnabnaha wrote on Friday, September 19, 2014:

Thank u MD Support…after fixing my Email function from Mercury Mail…I tested your script for automatic notification. It is brilliant…solved all my issue…Thank you so much.

Screenshot of the solved new look of the email…

![alternate text] (http://nahahealthclinic.no-ip.org/public/new_look_email.jpg)

Link: http://nahahealthclinic.no-ip.org/public/new_look_email.jpg