SMTP Configuration for sending emails (docker)

Bahmni supports sending of email notifications to patients on different events such as teleconsultation appointments, adhoc teleconsultation, prescription sharing etc. For these emails to flow out of Bahmni, SMTP server details needs to be configured in the .env file which will be used by the OpenMRS service.

.env file configuration

In your implementation specific env file, update the values for the below files. These properties can be retrieved from your SMTP provider such as AWS SES, Google Mail etc.

SEND_MAIL=true MAIL_FROM= MAIL_SMTP_HOST= MAIL_SMTP_PORT= MAIL_USER= MAIL_PASSWORD= MAIL_TRANSPORT_PROTOCOL=smtps MAIL_SMTP_AUTH=true MAIL_SMTP_STARTTLS_ENABLE=true MAIL_SMTP_SSL_ENABLE=true MAIL_DEBUG=false

Once the properties are updated, recreate the service by running docker compose up -d openmrs.

There are also few Global properties which control email sending behaviours for OpenMRS features. Thos can be accessed by navigating to OpenMRS → Administration → Settings → Mail

Reference Links:

  1. Send email from a printer, scanner, or app - Google Workspace Admin Help

 

The Bahmni documentation is licensed under Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)