Configuring Emails for Forgotten Username
To configure emails for forgotten username functionality, you can add the following code block to the selfservice-username.json
file:
{
"name" : "emailUsername",
"emailServiceUrl" : "external/email",
"emailServiceParameters" : {
"waitForCompletion" : false
},
"from" : "info@example.com",
"mimeType" : "text/html",
"subjectTranslations" : {
"en" : "Account Information - username"
},
"messageTranslations" : {
"en" : "<h3>Username is:</h3><br />%username%"
},
"usernameToken" : "%username%"
},
As suggested by the code block, it includes default email messages in English (en
), with a usernameToken
that includes the actual username in the message.
As noted in Username Retrieval, you can make these changes over the following endpoint URI: /openidm/config/selfservice/username
If desired, you can also configure forgotten username retrieval emails through the Admin UI. Select Configure > Forgotten Username. If needed, activate the Enable Forgotten Username Retrieval option, and in the Email Username box, select the icon. The Configure Email Username pop-up should appear.
When you use the Admin UI to customize forgotten username retrieval emails, you can review the changes in the selfservice-username.json
file.