Customize the Authentication Mail Templates

Last modified by Eleni Cojocariu on 2026/08/12 16:43

Steps

To change the emails XWiki sends when a user requests a password reset or a forgotten user name:

  1. Go to the XWiki.ResetPasswordMailContent page for the password reset message, or to XWiki.ForgotUsernameMailContent for the forgotten user name one.
  2. Edit the page with the object editor.
  3. Expand the "XWiki.Mail" object.

    mail-template-object.png

  4. Change the "subject", "html" and "text" properties, keeping the Velocity variables they contain.
  5. Click "Save".
  6. Request a password reset for a test user and check that the message received uses your wording.

FAQ

What are the Velocity variables in the template for?

They insert the data of the request, such as the user name and the link to follow, so a template stripped of them sends a message the user cannot act on.

Can the message be translated?

Yes, the mail is rendered with the locale of the request, so a template object per language provides the translated wording.

Related

Get Connected