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.
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.
You can update the OTP email subject and body as follows:
- Unpack the AM WAR file and extract the auth-nodes-<version>.jar file from the WEB-INF/lib directory.
- Navigate to the org/forgerock/openam/auth/nodes path within the extracted jar.
- 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:
- Repack the auth-nodes-<version>.jar with your changes.
- 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.
- Restart the web application container in which AM runs.
- Test your changes.