Configuration

Email

Configuration for email settings and templates.
Environment Variables
Environment variables are configurable for Directus Business Cloud and Enterprise Cloud projects via our Customer Success team. You can also set environment variables in self-hosted projects.

Email Transport

VariableDescriptionDefault Value
EMAIL_VERIFY_SETUPCheck if email setup is properly configured.true
EMAIL_TRANSPORTWhat to use to send emails. One of sendmail, smtp, mailgun, ses.sendmail

Based on the EMAIL_TRANSPORT used, you must also provide additional variables.

Sendmail

VariableDescriptionDefault Value
EMAIL_SENDMAIL_NEW_LINEWhat new line style to use in sendmail.unix
EMAIL_SENDMAIL_PATHPath to your sendmail executable./usr/sbin/sendmail

SMTP

VariableDescriptionDefault Value
EMAIL_SMTP_HOSTSMTP server host.
EMAIL_SMTP_PORTSMTP server port.
EMAIL_SMTP_USERSMTP user.
EMAIL_SMTP_PASSWORDSMTP password.
EMAIL_SMTP_POOLUse SMTP pooling.
EMAIL_SMTP_SECUREEnable TLS.
EMAIL_SMTP_IGNORE_TLSIgnore TLS.
EMAIL_SMTP_NAMESMTP client hostname.

Mailgun

VariableDescriptionDefault Value
EMAIL_MAILGUN_API_KEYYour Mailgun API key.
EMAIL_MAILGUN_DOMAINA domain from your Mailgun account.
EMAIL_MAILGUN_HOSTSpecify a custom host.api.mailgun.net

AWS SES

VariableDescriptionDefault Value
EMAIL_SES_CREDENTIALS__ACCESS_KEY_IDYour AWS SES access key ID.
EMAIL_SES_CREDENTIALS__SECRET_ACCESS_KEYYour AWS SES secret key.
EMAIL_SES_REGIONYour AWS SES region.

Email Templates

Templates can be used to add custom templates for your emails, or to override the system emails used for things like resetting a password or inviting a user.

VariableDescriptionDefault Value
EMAIL_FROMEmail address from which emails are sent.no-reply@example.com
EMAIL_TEMPLATES_PATHWhere custom templates are located./templates

In the EMAIL_TEMPLATES_PATH, you can create templates for your emails by adding .liquid files.

Overriding System Emails

There are a number of templates provided by Directus that can be overridden with a custom template:

TemplateFile
Password Resetpassword-reset.liquid
User Invitationuser-invitation.liquid
User Registrationuser-registration.liquid

When overriding the default email templates, make sure to include the provided url somewhere to ensure the email is functional.