How To
ForgeRock Identity Platform
Does not apply to Identity Cloud

How do I customize the email sent by the OTP Email Sender node in AM (All versions)?

Last updated Jul 6, 2022

The purpose of this article is to provide information on customizing the text in the OTP email sent by the OTP Email Sender authentication node in AM. The OTP Email Sender node sends an email containing a generated one-time password to the user.


Background information

The OTP email template is Plain Text. You can make simple changes to the content of the OTP email by editing the OneTimePasswordSmtpSenderNode.properties file, which is located in the auth-nodes-<version>.jar file in the WEB-INF/lib directory of the AM WAR file. You can find this file in the following path within the jar file: org/forgerock/openam/auth/nodes.

If you want more extensive changes that require HTML or Rich Text formatting, you will need to create a custom SMS Gateway Implementation Class, specify a different content type in the custom.java file and update the OTP Email Sender node configuration to specify the Gateway Implementation class you are using. See Authentication Node Development (AM 6.5 and later) or How do I customize authentication tree nodes using source code in AM 5.5.x and 6? for further information on customizing nodes.

Note

Creating and using a custom SMS Gateway Implementation class is outside the scope of ForgeRock support; if you want more tailored advice, consider engaging Deployment Support Services.

Changing the OTP email content

You can update the OTP email subject and body as follows:

  1. Unpack the AM WAR file and extract the auth-nodes-<version>.jar file from the WEB-INF/lib directory.
  2. Navigate to the org/forgerock/openam/auth/nodes path within the extracted jar.
  3. Edit the OneTimePasswordSmtpSenderNode.properties file and change the following properties as required to update the email subject and body:messageSubject=One Time Password messageContent=Your One Time Password:
  4. Repack the auth-nodes-<version>.jar with your changes.
  5. Add your customization to the AM WAR file:
    • Replace the existing jar file in the WEB-INF/lib directory with your customized jar file.
    • Repack the AM WAR file and deploy as normal.
  6. Restart the web application container in which AM runs.
  7. Test your changes.

See Also

OTP Email Sender Node

Authentication Node Development

Related Training

N/A

Related Issue Tracker IDs

N/A


Copyright and Trademarks Copyright © 2022 ForgeRock, all rights reserved.