From 4dae234c4d492d9ab18bec06fc14b70793cc768b Mon Sep 17 00:00:00 2001 From: Toms Sokolovs Date: Fri, 10 Jul 2026 10:12:11 +0300 Subject: [PATCH 1/2] Document Mailtrap email transport Add Mailtrap to the EMAIL_TRANSPORT options and a reference section for its environment variables (EMAIL_MAILTRAP_TOKEN, EMAIL_MAILTRAP_SANDBOX, EMAIL_MAILTRAP_INBOX_ID, EMAIL_MAILTRAP_BULK). --- content/configuration/email.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/content/configuration/email.md b/content/configuration/email.md index 4f1975050..61bf70872 100644 --- a/content/configuration/email.md +++ b/content/configuration/email.md @@ -11,7 +11,7 @@ description: Configuration for email settings and templates. | Variable | Description | Default Value | | -------------------- | ------------------------------------------------------------------------ | ------------- | | `EMAIL_VERIFY_SETUP` | Check if email setup is properly configured. | `true` | -| `EMAIL_TRANSPORT` | What to use to send emails. One of `sendmail`, `smtp`, `mailgun`, `ses`. | `sendmail` | +| `EMAIL_TRANSPORT` | What to use to send emails. One of `sendmail`, `smtp`, `mailgun`, `ses`, `mailtrap`. | `sendmail` | Based on the `EMAIL_TRANSPORT` used, you must also provide additional variables. @@ -51,6 +51,19 @@ Based on the `EMAIL_TRANSPORT` used, you must also provide additional variables. | `EMAIL_SES_CREDENTIALS__SECRET_ACCESS_KEY` | Your AWS SES secret key. | | | `EMAIL_SES_REGION` | Your AWS SES region. | | +### Mailtrap + +[Mailtrap](https://mailtrap.io) sends email through its API. Use the sandbox to capture emails in a test inbox during development, or send live email in production. + +| Variable | Description | Default Value | +| ------------------------- | ------------------------------------------------------------------------------------------------- | ------------- | +| `EMAIL_MAILTRAP_TOKEN` | Your Mailtrap API token. | | +| `EMAIL_MAILTRAP_SANDBOX` | Send to a test inbox instead of delivering email. Requires `EMAIL_MAILTRAP_INBOX_ID`. | `false` | +| `EMAIL_MAILTRAP_INBOX_ID` | The inbox ID to use when `EMAIL_MAILTRAP_SANDBOX` is enabled. | | +| `EMAIL_MAILTRAP_BULK` | Use the bulk sending stream for high-volume email. | `false` | + +Find your API token under **Settings > API Tokens** in your Mailtrap account. For sandbox testing, copy the inbox ID from **Sandboxes > (click on your sandbox) > copy the numerical ID from the URL**. + ## 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. From 80f9cfd844c73a6f40d261f09594c743319cfccc Mon Sep 17 00:00:00 2001 From: daedalus <44623501+ComfortablyCoding@users.noreply.github.com> Date: Thu, 27 Aug 2026 14:40:44 -0400 Subject: [PATCH 2/2] reword and update --- content/configuration/email.md | 36 +++++++++++++++------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/content/configuration/email.md b/content/configuration/email.md index 61bf70872..3b4d624e2 100644 --- a/content/configuration/email.md +++ b/content/configuration/email.md @@ -8,9 +8,9 @@ description: Configuration for email settings and templates. ## Email Transport -| Variable | Description | Default Value | -| -------------------- | ------------------------------------------------------------------------ | ------------- | -| `EMAIL_VERIFY_SETUP` | Check if email setup is properly configured. | `true` | +| Variable | Description | Default Value | +| -------------------- | ------------------------------------------------------------------------------------ | ------------- | +| `EMAIL_VERIFY_SETUP` | Check if email setup is properly configured. | `true` | | `EMAIL_TRANSPORT` | What to use to send emails. One of `sendmail`, `smtp`, `mailgun`, `ses`, `mailtrap`. | `sendmail` | Based on the `EMAIL_TRANSPORT` used, you must also provide additional variables. @@ -53,16 +53,12 @@ Based on the `EMAIL_TRANSPORT` used, you must also provide additional variables. ### Mailtrap -[Mailtrap](https://mailtrap.io) sends email through its API. Use the sandbox to capture emails in a test inbox during development, or send live email in production. - -| Variable | Description | Default Value | -| ------------------------- | ------------------------------------------------------------------------------------------------- | ------------- | -| `EMAIL_MAILTRAP_TOKEN` | Your Mailtrap API token. | | -| `EMAIL_MAILTRAP_SANDBOX` | Send to a test inbox instead of delivering email. Requires `EMAIL_MAILTRAP_INBOX_ID`. | `false` | -| `EMAIL_MAILTRAP_INBOX_ID` | The inbox ID to use when `EMAIL_MAILTRAP_SANDBOX` is enabled. | | -| `EMAIL_MAILTRAP_BULK` | Use the bulk sending stream for high-volume email. | `false` | - -Find your API token under **Settings > API Tokens** in your Mailtrap account. For sandbox testing, copy the inbox ID from **Sandboxes > (click on your sandbox) > copy the numerical ID from the URL**. +| Variable | Description | Default Value | +| ------------------------------ | ------------------------------------------------------------------------------------------ | ------------- | +| `EMAIL_MAILTRAP_TOKEN` | An API token from [your Mailtrap account](https://mailtrap.io). | | +| `EMAIL_MAILTRAP_SANDBOX` | Send to a test inbox instead of delivering email. Requires `EMAIL_MAILTRAP_TEST_INBOX_ID`. | `false` | +| `EMAIL_MAILTRAP_TEST_INBOX_ID` | The inbox ID to use when `EMAIL_MAILTRAP_SANDBOX` is enabled. | | +| `EMAIL_MAILTRAP_BULK` | Use the bulk sending stream. Cannot be combined with `EMAIL_MAILTRAP_SANDBOX`. | `false` | ## Email Templates @@ -73,17 +69,17 @@ Templates can be used to add custom templates for your emails, or to override th | `EMAIL_FROM` | Email address from which emails are sent. | `no-reply@example.com` | | `EMAIL_TEMPLATES_PATH` | Where custom templates are located | `./templates` | -In the `EMAIL_TEMPLATES_PATH`, you can create templates for your emails by adding [`.liquid`](https://liquidjs.com) files. +In the `EMAIL_TEMPLATES_PATH`, you can create templates for your emails by adding [`.liquid`](https://liquidjs.com) files. ### Overriding System Emails -There are a number of templates provided by Directus that can be overridden with a custom template: +There are a number of templates provided by Directus that can be overridden with a custom template: -| Template | File | -| ------------------ | ----------------------- | -| Password Reset | `password-reset.liquid` | -| User Invitation | `user-invitation.liquid` | -| User Registration | `user-registration.liquid` | +| Template | File | +| ----------------- | -------------------------- | +| Password Reset | `password-reset.liquid` | +| User Invitation | `user-invitation.liquid` | +| User Registration | `user-registration.liquid` | When overriding the default email templates, make sure to include the provided `url` somewhere to ensure the email is functional.