SMTP Configuration and Emails
Last updated
Was this helpful?
Last updated
Was this helpful?
You have two options for handling email functionality during development:
Without SMTP:
You can run the app without using SMTP by setting the environment variable EMAIL_SMTP_ENABLED=false
. Simply run hexabot start
and invite a new user. The app will behave as though it is sending emails, but nothing will happen in the background.
Using smtp4dev for Testing:
We use smtp4dev
for email testing in the development environment. To use this service, set the EMAIL_SMTP_ENABLED
to true
in the .env
file and restart the app using the command hexabot start --services smtp4dev
. Then, invite a new user or reset a password and check whether emails are received in the smtp4dev UI interface at . This also applies to other scenarios like the confirmation email after signup and the password reset email.
SMTP Config (Local Dev)
For local development with smtp4dev
, configure the following environment variables:
In production, use a third-party SMTP service by configuring the environment variables before running hexabot start
, here is an example:
Email strings are translated using the i18n system. You can find the translation files in the api/src/config/i18n
folder.
Email templates are located in the api/src/templates
folder. These templates are written in MJML syntax (you can read more about ).