Create email notification

Hi,

I tried to create a patient by registering in patient portal. However, I am getting an error message stating an error message showing 'Email Error: Invalid address: (From): root@localhosy

Can anyone help me how to setup email stmp in openemr?

Thank you

  1. List item

hi @digipics , could you help @jhunyan out? I assume you added your smtp credentials to Globals->Notifications.

Hi @jhunyan - happy to help you.

The way that error looks, are you trying to setup your env with sendmail or smtp?

SMTP is a bit easier unless you know your way around a linux box.

My recommendation: create an account with sendgrid, authenticate a sender with them (they can walk you through that process), then enter your sendgrid smtp credentials at Globals - Notifications.

Cheers.

1 Like

Hi @digipics,

Thank you for your reply.

I tried using Sendgrid but it did not work.

I also tried using mailtrap but similar problem occurs.

Here is the snapshot of the setting.

Please advise

A few things for you.

  1. I’d switch away from port 25 which is unsecured. Use port 587 and in the smtp security protocol, pick TSL

  2. Did you go through the sendgrid email integration guided setup? Hit Email API / Integration Guide. Choose smtp relay. Go through that interface - update the password in openemr (using the sendgrid api key) if needed - and then test creating a new patient in the portal. You should see within sendgrid a successful test.

  3. If all that is failing, tell me more about your infrastructure. Where is this hosted? What platform? What if anything have you done at a firewall level to open.close ports? etc. Note: some consumer/home network connections have port 25 closed (really insecure aka spam) so that is another reason to get off port 25 above.

cheers.

1 Like

fyi - more on sendgrid’s choices for ssl/tsl ports

1 Like

Hi, @digipics,

I tried like what you told me but still have similar result.

Attached are the snapshots


I am using Hosting24.com based on Cloud Hosting.

Please advise

Thank you

What are the values just above smtp settings?
I believe with sendgrid you need to use the same domain you have validated with them and looks like your email is still @localhost.

Looking for values for:
Patient Reminder Sender Name

Patient Reminder Sender Email

Notification Email Address

Hi, @digipics,

I entered the value for patient reminder sender name, patient reminder sender email and notification email address but I am getting a different error now.


Here is the DNS records on Sendgrid

Here is the host records I added to my hosting DNS editor


Please advise

Thank you

Hi, @digipics,

I went back and register as new test patient. It is working this time. I think I had to wait for DNS to propagate which it took some time. Attached is the snapshot

However, after registering as new test patient, it mentioned credential had been sent to my email. I checked on my email inbox and junk mail as well but could not find where it had been sent to.

Can you please advise what else need to be done?

Thank you

Good! Almost there.

You can repeat the notification easily by going into the Patients screen, find your created patient then click Create Portal Credentials at the top. That way you can generate emails w just a click. Try again to send and see if it is received.

Does sendgrid show the email is passing through? Check the sendgrid logs and mail history. What does the openemr logs say when you click create portal credentials?

1 Like

Hi, @digipics,

Thank you for your reply.

I checked on Sendgrid and there is activity receiving from Openemr for patient portal registration.

However, when I checked on Sendgrid, my hotmail is pending. It is possible the Hotmail has blocked email from Sendgrid.

Thank you anyway for your help. I hope our forum can become a documentation for anyone who want to setup email notification for Openemr.

1 Like

Thanks for closing the loop on this one. Happy to help. All the best.

1 Like

Yes, portal notification works fine, but other notifications do not, such as appointments

In my own experience, hotmail has a very high reject rate via sendgrid unless you are paying for a dedicated IP address. This only started happening the last 18 months as I always had great results with them previously. I was losing 30-50% of emails that would send out to my clients if they had a hotmail address. I tried Sendgrid’s dedicated ip option and was still losing 5-10% to hotmail addresses. I had to switch to mailgun in order to get better delivery rates.