Customize system emails
Drupal CMS provides an email templates dashboard that lets you preview, duplicate, design, and test HTML email layouts. Templates consist of HTML for layout, text, and placeholders (known as tokens) that represent information Drupal CMS adds to the email dynamically.
System emails such as password resets sent with your own template, and the email log confirming what went out.
Prerequisites
Section titled “Prerequisites”- A running Drupal CMS site with an administrator account.
- Email sending configured; see Set up email sending.
Browse the existing templates
Section titled “Browse the existing templates”- Go to Structure → Email templates
/admin/structure/email-templates/templates. The Templates tab lists ready-made layouts for user account events, for example Password reset and User account created. - Choose Preview template from the Operations menu to see how a template renders in a typical inbox: the headers, the HTML body, and the plain-text fallback.
Edit a template’s content
Section titled “Edit a template’s content”- Locate the template you want to change and choose Edit template from the Operations menu.
- Modify the template with the provided form. Select the Browse available tokens link under the content textarea to see the dynamic content items you can insert.
- In the Email storage section, control whether emails sent with this template are logged, and if so, for how long.
Assign the template to an email
Section titled “Assign the template to an email”Templates by themselves don’t send mail. An override tells Drupal when to use them:
- Switch to the Overrides tab.
- Select Add email override.
- Pick an Email to override from the drop-down, for example the user welcome email. Every system-generated email has a unique ID.
- Choose the template you edited.
- Save. From now on, that system email uses your custom template.
Verify
Section titled “Verify”Drupal CMS records each message it attempts to send (configured per template through the Email storage settings) in the email log at Reports → Email log/admin/reports/email. Use it to:
- Confirm delivery attempts: see whether Drupal tried to send a message you expect.
- Debug issues: if the status shows Failed, select View to review the error details and compare them with your SMTP provider’s logs.
- Check template changes: after editing a template, send a test email, then use the entry’s View link to preview the final HTML.
Each template’s Email storage settings decide whether and when its logged emails are purged, so export records you need for long-term auditing.
Variations
Section titled “Variations”Change the layout, header, footer, or colors
Section titled “Change the layout, header, footer, or colors”The template form edits the body of an email. The HTML layout, header, footer, and colors live in Twig template files and CSS. To change them, create a new theme that extends the email theme provided by the easy_email module, then update that module’s configuration to use your new theme. The developer theming track covers creating a theme.
Related
Section titled “Related”- Set up email sending connects the delivery service these templates send through.
- The
easy_emailmodule on Drupal.org provides the templates dashboard.
Was this page helpful?
Drupal is a registered trademark of Dries Buytaert.