done
Notification emails can be customized directly in the wiki. Administrators can change the overall email layout and add custom content to notification emails by editing the corresponding mail template pages.

Email notification templates

Three mail templates control the layout and content of notification emails:

Template Purpose
MediaWiki:Wrapper.mail Defines the overall email structure and styling, including the logo.
MediaWiki:SingleNotification.mail Defines the content of individual notification emails.
MediaWiki:DigestNotification.mail Defines the content of digest notification emails.

The wrapper surrounds the content provided by the notification templates. The {{{content}}} placeholder in the wrapper specifies where the notification content appears.
Customizing the templates requires administrator access and knowledge of wikitext, HTML, and CSS.

Example of a sent individual notification email
YouTube icon
YouTube: Notifications template (4:11 min.)

Customize the email wrapper

The MediaWiki:Wrapper.mail page defines the outer structure and styling of notification emails. Use this template to customize elements such as the logo, background color, and content spacing.

Email template with the outer wrapper and notification content
Email notification template

The page displays a preview of the current email layout. Edit the page in source editing mode to change the layout.
The wrapper uses HTML container elements to surround the {{{content}}} placeholder. The notification templates provide the content that appears at this position.

ImportantDo not remove the {{{content}}} placeholder. The wrapper requires this placeholder to insert notification content.

The HTML head element contains metadata and normally does not require changes.
The body element defines properties such as the background color and content spacing. Other HTML elements define the email structure, including the logo, content area, and footer.

The wrapper can reference the wiki logo with the {{logo}} variable:

<img src="{{logo}}" alt="MyCompany logo"/>

To use another image, replace the src value with the base64-encoded image data. For example:

<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAMCAgICAgMCAgIDAwMDBAYE BAQEBAgGBgUGCQgKCgkICQkKDA8MCgsOCwkJDRENDg8QEBEQCgwSExIQEw8QEBD/2wBDAQMDAwQDBAgEBAgQC wkLEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCABAAEADA SIAAhEBAxEB/8QAHAAAAgMAAwEAAAAAAAAAAAAAAAcFBggBAgQJ/8QAKxAAAgICAQMEAgEEAwAAAAAAAQIDBA UGBwAREggTITEUIkEVFiNCJTNR/8QAGgEAAgMBAQAAAAAAAAAAAAAAA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pxjX0HMc bw4++MRl/b+XvyyT1PZINY15XJaIwMqtER8qyg9yerTxtpi8eaFgNHTKTZEYPHw0TbmUK0xRQC3iPhAT37KPh R2A+urL08CYS8CZVE4047zOl283l9k21diy2ceobN0Y9abSivAIUaREdlMhUAsyhFJ+kUADq99HR0KV//9k=" alt="MyCompany logo"/>

To obtain the base64 encoding of an image:

  1. Open Chrome Developer Tools.
  2. Open the Sources tab.
  3. Locate the image file.
  4. Copy the base64-encoded image data.
  5. Use the encoded data as the value of the src attribute.
Sources tab of Chrome Developer Tools showing base64-encoded image data
Base64 encoding

Keep the content placeholder

The wrapper must contain the {{{content}}} placeholder. This placeholder determines where the notification content appears in the email. For example:

{{{content}}}

Do not remove or replace this placeholder when customizing the wrapper.

Customize notification content

The notification templates define the content that the wrapper displays.

Individual notification emails

The MediaWiki:SingleNotification.mail template defines individual notification emails. These emails are sent immediately after a triggering event.
Because the template is used for different types of notifications, avoid replacing the default notification content. Additional content can be added around the existing content.
For example, administrator contact information can be added between the HTML div containers. This places the additional information above the footer.

Source view of the SingleNotification template with additional custom text
SingleNotification custom text

To add custom text:

  1. Open MediaWiki:SingleNotification.mail in source editing mode.
  2. Locate the position where the additional content should appear.
  3. Add the required HTML or wikitext.
  4. Save the page.

Additional text can also be provided through a system message. This allows the text to appear in the language configured in the recipient's preferences.
After saving the changes, the updated template appears in the email preview.

Email template preview showing customized notification content
Customized notification email
Security errorLinks in the email preview can cause a security error when selected. This does not affect links in the actual notification emails.

Digest notification emails

The MediaWiki:DigestNotification.mail template defines the content of digest notification emails.

Test notification email templates

Administrators can test changes to notification email templates with Special:NotificationTester.

  1. Open Special:NotificationTester.
  2. Follow the instructions on the page to test the notification template changes.