Joomla 4 email template override gives the possibility to use additional custom fields, attachments, and more options, that were not possible in Joomla 3 versions.
Joomla 4 users can fully control the content of the emails sent from their websites. It’s all possible with a new extension called com_mails.
A new com_mail component has been added as a Joomla 4 feature. It is used to customize the email templates sent to users, which work for different actions, including the contact form, registration, Joomla password reset, reminder, and more.
Log in to the Joomla 4 administrator panel. In the left menu, click "System" and then choose "Mail Templates."
Each email template can be easily created and customized for different subjects. Multiple email templates are based on five main components:
There are eight different types of email template customizations (each component has its types). The different types of email templates are:
Sent when you click the "Send Test Mail" button in the Global Configuration. It is sent to the sending mail address set in the mail settings (admin can check whether the email functionality is working correctly or not.)
This email template with the content of the "Contact Form" email (websites users send a contact inquiry mail.)
This template is sent to the mail submitter with the contact form only if the optional "Send Copy to Submitter" is enabled and selected.
The "Mass Mail Users" email template, with the content sent to all the website users.
Sent to a user by the "Forgot your password?" a password reset request link.
Sent to a user by the "Forgot your username?" a username reminder request link.
Sent to a new user registered on the website.
Sent to the website admins when the "Joomla! Update Notification" system plugin detects an update. It requires the update notification plugin to be enabled.
Log in to the admin dashboard and go to the System. Navigate to “Mail Templates.” You’ll see a list of 8 different types of templates. Each of them can be customized.
Open the first item on the list (as the example here): Global Configuration: Test Mail.
You have to set the “Edit Subject” and “Edit Body” options as “Yes.” Once you enable them, you will also see the “Available tags” box. Each mail template comes with its own set of tags.
Each mail template uses the Plain text editor by default, but you can change it to an HTML editor.
In the Mail templates list page, navigate to the "Options".
Now in the “Mails” tab, you can choose between Plain text / HTML / Both
Again open any of the mail templates, and you will either see both the editors or the one you choose.
You should know that the HTML editor gives much more possibilities than the regular plain text editor.
Let’s stay in the “Options.” In the “Mail Tab,” you’ll find more to configure.
Email templates is another great new feature in Joomla 4. With the wide range of customization supporting custom fields, HTML editor, and tags, users can easily create and customize their mail templates in Joomla 4.