Wiki source code of Customize the Notification Email Template
Last modified by Eleni Cojocariu on 2026/10/14 12:04
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | The mail the wiki sends is rendered from an ##XWiki.Mail## object stored in the ##XWiki.Notifications.MailTemplate## page, so changing its wording or layout is an ordinary page edit; [[Notifications>>doc:documentation.xs.admin.notifications.WebHome]] says where the rest of the mail behaviour is configured. | ||
| 2 | |||
| 3 | 1. Navigate to the ##XWiki.Notifications.MailTemplate## page and edit its objects. | ||
| 4 | 1. Open the ##XWiki.Mail## object it holds.((( | ||
| 5 | {{image reference="mail-template-object.png" size="extra" alt="The XWiki.Mail object of the notification mail template"/}} | ||
| 6 | ))) | ||
| 7 | 1. Edit the ##html## property for the HTML part of the mail and the ##text## property for its plain-text part. | ||
| 8 | 1. Attach to the page any image the template needs, and reference it in the ##html## property by its attachment name.((( | ||
| 9 | {{code language="html"}} | ||
| 10 | <img src="cid:my-logo.png"/> | ||
| 11 | {{/code}} | ||
| 12 | ))) | ||
| 13 | 1. Save the page and check that the object holds your version of the template.((( | ||
| 14 | {{image reference="mail-template-saved.png" size="extra" alt="The saved XWiki.Mail object holding the edited template"/}} | ||
| 15 | ))) |