• About us
    • Joomla Home
    • What is Joomla?
    • Benefits & Features
    • Project & Leadership
    • Trademark & Licensing
    • The Joomla Foundation
    • Support us
    • Contribute
    • Sponsor
    • Partner
    • Shop
    • Downloads
    • Extensions
    • Languages
    • Get a free site
    • Get a domain
    • User Guide
    • Training
    • Certification
    • Site Showcase
    • Announcements
    • Blogs
    • Magazine
    • Community Portal
    • Events
    • User Groups
    • Forum
    • Service Providers Directory
    • Volunteers Portal
    • Vulnerable Extensions List
    • What is Joomla Academy?
    • What is Google Summer of Code (GSoc)
    • Joomla License FAQs
    • Developer Network
    • Developer Manual
    • Security Centre
    • Issue Tracker
    • GitHub
    • API Documentation
    • Joomla! Framework

Joomla! User Documentation

Download
Launch
  • User Guide
  • Tutorials
  • Contributors
  • Jobs To Do
  • Getting Started
    • Introduction to Joomla!
    • Joomla Core Features
    • Hosting Setup
    • Installing Joomla
    • Logging in to Joomla
    • Articles and Categories
    • Adding a Category
    • Adding an Article
    • Adding a Menu Item
    • Adding a Module
    • Keyboard Shortcuts
  • Articles
    • Articles: Categories
    • Articles: Filter Options
    • Articles: Featured
    • Articles: Archive
    • Articles: Delete
    • Article: Edit - Content
    • Article: Edit - Headings
    • Article: Edit - Images
    • Article: Edit - Links
    • Article: Edit - Lists
    • Article: Edit - Tables
    • Article: Edit - Pagination
    • Article: Edit - Read More
    • Article: Edit - Images and Links
    • Article: Edit - Options
    • Article: Edit - Publishing
    • Article: Edit - Metadata
    • Article: Edit - Configure Edit Screen
    • Article: Edit - Permissions
    • Article: Save to Menu
    • Article: Versions
    • Article: Preview
    • Article: Accessibility Check
    • Article: Access Restriction
    • Article: Check-in
  • Banners
    • Banners
  • Command Line Interface
    • Using the CLI
    • Joomla CLI Installation
  • Configuration
    • Global Configuration
    • Site Offline
    • SMTP mail and Gmail
    • The htaccess.txt file
    • The robots.txt file
    • Adding www to a URL
    • Disallow Image Hotlinking
    • Disallow Directory Listing
    • Password Protect Directories
  • Contacts
    • Contacts
    • Category List Override
  • Dashboards
    • Home Dashboard
    • Content Dashboard
    • Menu Dashboard
    • Components Dashboard
    • Users Dashboard
    • System Dashboard
    • Help Dashboard
  • Editors
    • Content Editors
    • TinyMCE Plugin
    • Codemirror Plugin
    • HTML Filters
  • Extensions
    • Installing an extension
    • The Joomla Extensions Directory
    • Vulnerable Extensions
  • Fields
    • Fields and Field Groups
    • Field Parameters
    • Calendar Field
    • Checkboxes Field
    • Colour Field
    • Editor Field
    • Integer Field
    • List Field
    • List of Images Field
    • Media Field
    • Note Field
    • Number Field
    • Radio Field
    • SQL Field
    • Text Field
    • Textarea Field
    • Url Field
    • User Field
    • Usergroup Field
    • Subform Field
    • Multilingual Sites
    • Template Overrides
  • Help
    • Guided Tours
    • Administrator Help
  • Hosting & Installation
    • Free Hosting
    • cPanel Hosting
    • Bitnami Installation
    • Raspberry Pi Installation
    • Auto Installer Installation
    • Moving Installation Directory
    • Local Setup
  • Hosting Notes
    • UNIX File Permissions
    • Windows File Permissions
    • Multiple Domains and Web Sites in a single Joomla! installation
    • Sub-Domains, Parked Domains and Add-On Domains
    • Nginx
    • Apache PHP Handlers
    • Optional Technical Requirements
  • Languages
    • Setup a Multilingual Site
    • Multilingual Associations
    • Language Overrides
    • Debugging a Translation
  • Local Setup
    • Local Hosting on Windows
    • Laragon Setup (Windows)
    • Local Hosting on Linux
    • Docker Setup
    • Local Test Setup
  • Mail Templates
    • Options
    • Editing
    • Mass Mail Users
    • Managing Template Layouts
    • Tags Cross-Reference
  • Media
    • Managing Media
    • Upload Delete Rename
    • Image Crop Resize Rotate
    • Media File Locations
    • Media: Options
    • Uploading SVG files
  • Menus
    • Adding a New Menu
    • Menu Items
    • Menu Item Types
    • Menu Item Order
    • Submenus
    • Menu Positions
    • Auto redirect guests to login
    • Archived Articles
    • Custom Administrator Menu
  • Migration & Upgrade
    • Version Update
    • Migration Basics
    • Can I Do this Myself?
    • Joomla 5 to 6
    • Joomla 4 to 5
    • Joomla 3 to 4
    • Joomla 2.5 to 3
    • Joomla 1.5 to 4
    • Joomla 1.0 to 1.5
  • Modules
    • Site Modules
    • Administrator Modules
    • Module Positions
    • Module Display by Menu Item
    • Modules inside Articles
    • Login Form
    • Module Styles
    • Archived Articles
    • Custom Module
  • News
    • News Feeds
    • News Display
  • Performance
    • Page Analysis
    • Monitoring Server Health
    • Monitoring Site Speed
    • Accessibility Checker
    • Managing 404 Errors
  • Plugins
    • About Plugins
    • Joomla! Update Notification
  • Privacy
    • Privacy Outline
    • Privacy Setup
    • Privacy Workflow
    • Cookies
  • Problems
    • Assorted Issues
    • Unsupported PHP Version
    • FatalError
    • Database Table Structure
    • Local Host Email
    • Database Connection
  • Reference
    • Joomla Licenses
    • Joomla! Copyright
    • What are web standards?
    • Where are the web pages?
  • Security
    • Best Practices
    • HTTP Headers
  • SEO
    • SEO Basics
    • Search Engine Friendly URLs
    • SEF URLs on Apache
    • SEF URLs on Nginx
    • Monitoring SEO
    • Using A Sitemap
    • Schema.org
  • Schema.org
    • An Introduction to Schema.org
    • Schema.org System Plugin
    • Accessing Schema.org Custom Fields
    • Article BlogPosting Type
    • Article Book Type
    • Article Event Type
    • Article JobPosting Type
    • Article Organization Type
    • Article Recipe Type
  • Smart Search
    • Smart Search Quickstart
    • Smart Search on Large Sites
    • Smart Search Layout Overrides
    • Smart Search Indexing
    • Smart Search FAQs
    • Smart Search Options
    • Smart Search Test Plan
  • System
    • Backup
    • Cache
    • Purge Expired Cache
    • Top 10 Stupid Tricks
  • Tags
    • Content Tags
  • Templates
    • Template Basics
    • Cassiopeia Customisation
    • Template Overrides
    • Template Layouts
    • Child Templates
    • Favicons
    • Template SVG Logos
    • Cassiopeia templateDetails.xml
    • Switching Templates
    • Home Page in Different Style
    • Module and Menu Styles
    • Font Awesome Fonts
  • Test Installations
    • Visual Studio Code Primer
    • Visual Studio Code Extras
    • Setting up Apache, PHP and MySQL manually
    • File Permissions: Linux
    • File Permissions: Windows
  • Users
    • Access Control
    • User Registration
    • User Profile
    • User Password Reset
    • Admin Password Recovery
    • User Password Security
    • WebAuthn Login
    • Multi-factor Authentication
    • Guest Access
    • Changing User's Groups
    • Login and Logout Redirects
    • User Actions Log
  • Workflows
    • Publishing Workflow
    • Workflow Example 1
    • Workflow Example 2
  1. You are here:  
  2. Home
  3. Documentation
  4. User Guides
  5. Site Building
  6. Mail Templates

Mail Templates

Mail Templates Editing

As an example, let's look at the first template listed above, "User Actions Log: Notification Mail". For this example site, the editor format has been set to HTML in the Mail Templates Options. As you can see, the template title, ID, and description cannot be modified. Placeholder Tags recognized in the selected template are listed to the right of the editor window. These are the only Tags that can be used within this particular template; these will vary from template to template. Clicking on one of the Tag links on the right will insert that tag into the editor at the current cursor location. In this example, all of the available tags already appear in the template.

There is no documentation for how to use these Tags other than the examples provided by the respective default template code, and even there its usage is only implied. As you can see in this case, most of the Tags are single-instance. Only the {MESSAGES} Tag is an iterative tag, meaning that it causes single-instance Tags used between the {MESSAGES} and {/MESSAGES} tags to be iterated over the range provided by the Extension that uses this template.

Mail Templates Editor

This default template has been designed to use an HTML table to format the output in a tabular layout, which makes a lot of sense. The iterative aspect of the {MESSAGES} tag will cause a row to be created on-the-fly for every {MESSAGE} included in the scope of user actions to which the generated Mail Message applies. When Plaintext format is selected in Mail Templates Global Options, the same template looks a bit like markup.

Plaintext Mail Template Editor

The Options tab for the Mail Template Editor provides template-specific options that override the Global Mail Template Options. In most cases, you should not need to modify these settings.

  • Mail Settings: If set to Yes, allows you to override the site default Mail server account configuration. In most cases, you will probably not need to change this.
  • Mail Template Layout: Enables or disables the use of the layout selected below.
  • Layout: Select the Global layout or another layout, if available.
  • Logo File: Enables or disables the use of the Logo File set in Global Mail Template Options.

Mail Templates Managing Layouts

Creating a Layout Override

This feature also allows you to create mail template layout overrides for your active site template. By creating layout overrides, you can customize the general or specific layout of emails sent using the Mail Templates function without the risk of losing changes during future Joomla updates. You can create as many Mail Template layout overrides as you need, and you can also use a different layout for each Mail Template if necessary.

To create a mail template override, first do the following once:

  1. Go to System -> Site Templates -> Open your template (e.g., Cassiopeia) Details and Files.
  2. Click the Create Overrides tab and then select joomla -> mail.
  3. This will make Joomla! copy the mailtemplate.php file to your template's '/html/layouts/joomla/mail/' directory, where you can modify it as needed.

Once the override is created, you can edit the layout override file and customize the styles of your emails without affecting the base template.

Custom Layouts

When you created your layout override, you made a copy of the file mailtemplate.php, which is the name of the default file that comes with the Joomla! distribution. The default layout is a table with 3 content rows. The first row will contain the logo you uploaded into the Mail Templates Global Options. If you did not upload a logo, your site name will appear in this row. The second row will contain the message generated by the extension utilizing Mail Templates. The third row will contain a copyright footer with the current year and your site name and URL. This may not be what you want your mails to look like, which is where making a custom layout comes in.

The layout file is PHP, but it contains a lot of HTML as well. You'll want to be familiar with this type of template to make changes, though it might be worthwhile to create a new layout with a WYSIWYG editor and then embed the necessary PHP code into the HTML created by that editor. Just make sure the file you edit is one located at your template's '/html/layouts/joomla/mail/', which is its overrides folder.

Selecting a Mail Templates LayoutYour file(s) do not need to be named mailtemplate.php and you can create as many different ones as you want. In the Mail Templates Global Options you select the one you want Mail Templates to use by default for all Mail Templates. The names of all .php files in your template's '/html/layouts/joomla/mail/' folder will appear in the Layout drop list. Shown here is the initial override layout file created. Selecting Default for Layout here will cause the original distribution's layout file to be used if a different one is not selected for a particular Mail Template.

Testing and Configuration

  1. Ensure the Mail Template Global Options are configured according to your needs, including the default layout you prefer.
  2. If individual template settings are enabled, go to System -> Mail Templates, click on the Mail Template you want to configure, then click on the Options tab.
  3. If you created a Custom Layout for this Mail Template, set Mail Template Layout to Enabled, then select the Layout you want to use for this Mail Template.
    Custom Layout per Mail Template
  4. If you want your Mail Templates logo to appear in these messages, set Logo File to Enabled.
  5. Send a test mail to verify that the global or template-specific settings are applied correctly.

It may be easiest to use the Mass User Mails template to do this sort of testing since you can send those messages directly without having to provoke the internal system function that uses one of the other Mail Templates. You'll benefit from creating a special (e.g. "Testing") user group that includes at least one user with another of your own email addresses other than the Administrator account you are using. Select that group when sending the test message.

Mail Templates Mass Mail Users

Mass Mail UsersMass Mailing Users is a capability that facilitates the Mail Templates feature. It's a simple capability that deserves mention here since it is so simple it may not warrant any higher visibility. The Mass Mail Users default Template uses all available template tags in the most basic way. However, this template can be embellished with formatting, logos, signatures, etc. to make the messages easily recognizable as legitimately sent from your site.

The Mass Mail editor is accessed from the main menu under Users. It is recommended that you set the Mail Template format in Global Options to HTML. Also, if you want to include your organization's logo, you can either set it in the Mail Templates Global Options or place it within the Template using the Template Editor. You can optionally put it into the actual message.

Mass Mail Users Editor

 

The Mass Mail Users editor is presented as shown on the right. As of Joomla! 5.3.2, the WYSIWYG editor is not available in this message editor. Note that if the Subject Prefix and/or Mainbody Suffix is set in Global Options, they will appear in this view whether or not the {SUBJECTPREFIX} and/or {BODYSUFFIX} tags, respectively, are included in the Mass Mail Users template. Here they are set to "[Mass Mail]" and "Regards, The Webmaster", respectively.

Mass Mails can only be sent to defined User Groups. Options available when editing a Mass Mail message are as follows:

Mail to Child User Groups

Also send the message to children of the selected Group.

Send in HTML Mode

Send the message in HTML mode.

Send to Blocked Users

Send to all users in the Group whether blocked or not.

Recipients as BCC

Use BCC to send to all recipients. Note, this is frowned upon by some email services.

Group

Select the User Group to which you want to send the message. It will be sent to all users in this group unless some are blocked and "Send to Blocked Users" is not selected.

Note: As of Joomla! 5.3.2, the Mass Mail Users messages are appended with a copyright footer regardless of any option settings.

Mail Templates Options

Mail Templates OptionsGlobal Options

To access Global Mail Template Options, you can either click on the Options button in the upper right when the Mail Templates list is open or go to Global Configuration and click on Mail Templates.

Here you set the default options for all Mail Templates.

  • Mail Format: HTML, Plaintext, or Both. Note that when Both is selected, the Plaintext Mail Template Editor is presented.
  • Per Template Mail Settings: If set to Yes, defers to using template specific Mail options.
  • Send Copy: If Enabled, sends (CC) a copy of the message to the the site's default email address unless Per Template Mail Settings is set to Yes and the template-specific options are defined.
  • Attachments Folder: Relative path from the site root to the folder containing files to be attached to the message (if the template supports attachments).
  • Mail Template Layout: If Enabled, causes the Layout selected below to be used.
  • Layout: Select the layout to be used. Typically, just Use Default.
  • Logo File: A logo (image) file to be used in the mail message. Can be selectively omitted from individual Mail Templates but not from individual messages. Template-specific logos cannot be selected. If enabled, the logo will appear at the head of the message, centered, followed by a horizontal line.

Other Options

Some Mail Template options depend on settings located elsewhere in various configuration settings. Each subsection below focuses on settings located in the section-specific area of Global Configuration.

Users

Mass Mail Users tab: Allows texts for a subject prefix ({SUBJECTPREFIX} template tag) and a body suffix ({BODYSUFFIX} template tag) to be specified. These tags are only used in the "Users: Mass Mail Users" Mail Template. The content configured here is inserted when these tags are included in the Mass Mail Users template. If these tags are not included in the template, then the configured texts will not be included in messages sent via this feature even though while editing the message (see Editing) these texts will appear left of the Subject field and after the Body field. Don't be fooled!

User Actions Log

Options tab: "Events To Log" determines what actions ({MESSAGE} template tag) end up in the message. This information is only used by the "User Actions Log: Notification Mail" template.

Mail Templates Tags Cross-Reference

The following table shows in which Extensions each Mail Template keyword is used. Note that its purpose may be different for different Extensions.

Tag Text Extension
User Action Logs Contacts Configuration Messaging Privacy Users Multi-factor Authentication Task - Privacy Consents Task - Joomla! Update Notification User - Joomla!
ACTIVATE           X        
BODY   X       X        
BODYSUFFIX           X        
CODE             X      
CONTACTNAME   X                
CURVERSION                 X  
CUSTOMFIELDS   X                
DATE X                  
EMAIL   X       X X     X
EXTENSION X                  
FORMURL         X          
FROMNAME       X            
FULLNAME             X      
LINK                 X  
LINK_TEXT           X        
LINK_HTML           X        
MESSAGE X     X            
MESSAGES X     X            
METHOD     X              
NAME   X       X       X
NEWVERSION                 X  
PASSWORD                   X
PASSWORDCLEAR           X        
RELEASENEWS                 X  
SITENAME   X X X X X X X X X
SITEURL       X   X X      
SUBJECT   X   X   X        
SUBJECTPREFIX           X        
TOEMAIL       X            
TOKEN         X X   X    
TOKENURL         X     X    
TONAME       X       X    
URL   X     X     X X X
USERNAME X         X X     X
  1. You are here:  
  2. Home
  3. Documentation
  4. User Guides
  5. Site Building
  6. Mail Templates

  • Joomla! on Facebook
  • Joomla! on X
  • Joomla! on Bluesky
  • Joomla! on Threads
  • Joomla! on YouTube
  • Joomla! on LinkedIn
  • Joomla! on Pinterest
  • Joomla! on Instagram
  • Joomla! on GitHub
  • Home
  • About
  • Community
  • Forum
  • Extensions
  • Services
  • User Guide
  • Developer
  • Shop
  • Accessibility Statement
  • Privacy Policy
  • Cookie Policy
  • Sponsor Joomla! with $5
  • Help Translate
  • Report an Issue
  • Log in
 A Digital Public Good.

© 2005 - 2026 Open Source Matters, Inc. All Rights Reserved.

Rochen
Joomla! Hosting by Rochen
We have detected that you are using an ad blocker. The Joomla! Project relies on revenue from these advertisements so please consider disabling the ad blocker for this domain.