From form submission confirmation messages to password recovery requests, system emails are an important part of any website or application. The design of these emails is therefore an important touchpoint that should not be forgotten about. In this tutorial, I’ll explain step-by-step the process to enable and style custom HTML emails in Drupal 8.
1. Enable modules
There are many different modules out there, I’ve had the most success with the combination of these three modules: Mail System, Mime Mail, and SMTP.
2. Configure modules
Mail System
Once your modules are installed and enabled, head over to the Mail System configuration page (Configuration > System > Mail System). Here, you’ll set your mail formatter and sender. We’ve seen the best results with the combination of using Mime Mail mailer as the Formatter and SMTP Mailer as the Sender. Finally, set the theme to render the emails to your active theme. You can skip module-specific configuration unless you find that you need it for your specific use case.