How do i actually send an email to my client from within openemr?

Go to admin miscellaneous batch communications. The tool to use them is there.

ok thanks, this i missed altogether… will check out.

error
Could not send email due to a server problem. 11 emails not sent

below are my notification settings…

changed the setting to tls also still same error.
changed username to ‘without @gmail.com’ also still same error.

any help pl.

have used sendgrid and aws ses successfully for sending emails via SMTP (for development/testing purposes). Note you need to go through a third party SMTP service (ie. pretty sure you can’t have it go through a personal google account name/pass).
as an example, the aws ses settings i use are:
Sender name: OpenEMR (this can be anything)
Sender email: brady.miller@open-emr.org (the aws ses account i use has validated that domain name)
Notification email: my email address (this is where emails go to when it needs to send messages to the admin)
Email method: SMTP
server hostname: email-smtp.us-east-1.amazonaws.com (note this is dependent on the region of your aws ses service)
port number : 587
protocol: TLS
user auth: credential for aws ses
pass auth: credential for aws ses

gmail actually is not working.
I have a domain name and have hosted openemr there.
eg
eg support@mydomain.com
smtp.mydomain.com
465
ssl
i tried tht also its not going, says server error.
but when i open my email support@mydomain.com the emails are created but not sent.
still the error is same

Could not send email due to a server problem. 12 emails not sent

@Robert_James
some time ago Google made changes to their security protocol for SMTP and was no longer allowed to just plug in credentials and it work. You have to set up the app and they no longer allow lesser secure apps. If you insist on using Google I suggest you follow their instructions.

Here is a third-party instruction on how to use Google SMTP.

I am with @Brady. I use sendgrid. Here is a little tool I created to help me test my SMTP connection. Drop this file into the interface folder and access it from the browser HTTP://localhost/interface/testmail.php. It will show you what is happening with your SMTP connection and then you will a better chance of fixing it.

testmail.php (1.6 KB)

1 Like

after using testmail.php my head is spinning. :joy:

there’s a recently updated wiki that goes over google workspace and gmail setup

Hello, for a few months I have been using sendinblue.com (now brevo.com). It works great with appointment reminders. Free works with 300 emails per day.
Smtp: smtp-relay.sendinblue.com
Port: 587
User: user@gmail.com
Security: None
Regard.
Luis.

1 Like

I think I’ll give this a try

1 Like

Its not working with openemr.

And can we email a single patient?

Yes, the patient portal already does this for portal credentials and resetting credentials etc.

1 Like

I have followed the steps that you describe to setting up email on admin | globals | notifications. I have setup patient demographics | choices | allow mail message and allow email. I have setup patient email as demographics | contact | contact email.
Then I went to message center, create a dated reminder, I send it to this patient, add a copy to myself (admin), add a due date, no time span, high priority and a custom message (regards from OpenEMR). A pop up message shows as “Reminder Sent”, I clicked on OK.

But no email has arrived to my patient mailbox, or admin mailbox (don´t know how to add admin´s email).

Thanks in advance

Hi Marco, It’s been awhile.
I don’t recall that Patient notes(Messages) allows sending email except if you’re using Direct(@adunsulag put in v7.0.0 but it may only be for sending CCDA’s) and Direct is a pain for patient emails.
However during my recent endeavor into sending portal onetime notifications via SMS and Email I developed an Email client for my faxsms module that supports creating events for sending emails to patients. The module can be turned on separate from fax and SMS.

All that is needed is to put an event in Messages. The support is there if either I get around to doing it or someone else wants to leverage to capability.

The contact form will look similar to below where if SMS is enabled then message can be sent via SMS, email or both.

Hi,
I have done the following:
Sender name: Clinic name
Sender email: email verified in SES.
Notification email: email verified in SES.
Email method: SMTP
server hostname: email-smtp.us-east-1.amazonaws.com
port: 587
protocol: TLS
user auth: access key created from SES (manage my existing SMTP credentials, it took me to IAM and there I created an access key and stored its password.
pass auth: password generated.

When I tried to send a patient resetted credentials from OpenEMR using admin user, I got a report that says “Portal Credential Information, Email was not sent to the following address: macomeza@gmail.com.”

Then I tried to reset my credentials as a patient through portal (I have added reCaptcha v2 (Patient Port Google reCAPTCHA V2 site key), and I got an error that email can´t be sent.

I then look to Admin | System | Logs I found this logged message "Patient password reset failure: The reset email to macomeza@gmail.com for pid 1 was not successful because of following issue: SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: Message rejected: Email address is not verified. The following identities failed the check in region US-EAST-1: macomeza@gmail.com
SMTP code: 554 "

It is trying to use patient´s email instead of sender email.

Update: I change my patients email to one verified identity email in Amazon SES, then I got my reset email.
I have to set contact email and trusted email to my verified identity to be able to receive my reset credentials email.

Any advice?

Need to be the same email address. that is a likely problem noted in
SMTP Error: data not accepted.SMTP server error: DATA END command failed Detail: Message rejected: Email address is not verified. error.

Otherwise I don’t know.

I have noticed, that initially Amazon SES is in sandbox mode, which means that one can just send emails to verified emails at SES.
To solve this, one has to open a support ticket and request your service to go on production mode and be able to send emails to anybody.

Error: data not accepted.SMTP server error: DATA END command failed Detail: Message rejected: Email address is not verified. The following identities failed the check in region US-EAST-1: macomeza@gmail.com
SMTP code: 554 "

email address is not verified
the email should be marcomeza@gmail.com?

Thank you Luis,

I have figured out what did happen. When you setup AWS SES, you are by default in sandbox mode, in which you are able to send emails just to some white list emails (you can add email address, you will receive a SES email that validates its you). You can´t send emails to other email addresses that are not verified, until you are on production mode.
If you want to be able to send emails to anybody, you need to start a SES production mode request, AWS support will ask some questions by email and you have to prove how you will use emails and what controls do you have. They want to minimize some risks associated with spam.

My request is 2 days old, I will update my status here. Thank you to everyone and hope this can help other community members as well.

3 Likes