Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-16552

Use templates to build keycloak mail subjects

    XMLWordPrintable

Details

    • Feature Request
    • Status: Triage
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • NEW
    • NEW
    • ---
    • ---

    Description

      Emails sent by Keycloak (eg. password update emails, account linking emails,...) cannot have their subject built through templates just like the mail body. The subject construction occurs by retrieving the subject text from message.properties using a key.
      Using a template mechanism to build the mail subject would allow the following advantages:

      • Add the possibility to customize the subject with user or realm properties. Currently email subjects can only be a static string with the exception of the idp-link email subject that allows a single (static) parameter (idpalias)
      • Configure "action specific" subjects. Currently all required actions share the same "Update your account" phishing like subject located behind the executeActionsSubject key in message.properties.

       
      It wouldn't necessarily require to ship default templates. The default behaviour could be the current one and users with advanced needs could add the required template to their custom theme folder.
      It would also be possible to ship default mail subject templates that emulates the  current behavior by using a template like this:

      ${msg("configureOTPMailSubject")} 

       
      And for the link-account mail something like this:

      ${msg("identityProviderLinkSubject", idpalias)}

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            jfellmann@gmail.com Joaquim Fellmann (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: