Email and SMS Options Skip to main content
https://support.okta.com/help/oktaarticledetailpage?childcateg=&id=ka02a0000005ufbsaq&source=documentation&refurl=http%3a%2f%2fsupport.okta.com%2fhelp%2fdocumentation%2fknowledge_article%2femail-and-sms-options-1077615107
How satisfied are you with the Okta Help Center?
Thank you for your feedback!
How satisfied are you with the Okta Help Center?
1
2
3
4
5
Very Dissatisfied
Very satisfied
Enter content less than 200 characters.
Average Rating:
Email and SMS Options
Published: Jan 31, 2018   -   Updated: May 15, 2018

okta-doc-source

Email and SMS Options

Options in the Email and SMS tabs allow you to customize default email and SMS notifications.

Email Tab

Okta sends email notifications to end users for a variety of reasons, including:

  • User activation
  • Forgotten password
  • Reset password
  • Self-service unlock account

Email notifications are generated automatically and sent to end users according to your settings. You can also configure a custom email domain so that email Okta sends to your end users appears to come from an address that you specify instead of the default Okta sender.

Email templates

Okta email templates contain default text suitable for a particular type of account activation, password reset, or account unlock scenario. You can customize email templates in order to send end users custom Okta-generated email messages in multiple languages. For details, see Add Custom Email Templates for Multiple Languages.

Advanced Customization

To configure advanced customizations, use the Expression Language (EL) script. In addition to having many common variables, each customizable email has additional unique variables.

Customization Variables

Here are some example template variables and their corresponding EL expression:

VariableEL Expression
baseURL${baseURL}
user.email${user.email}
recoveryToken ${recoveryToken}
activationLink ${activationLink}
samAccountName${samAccountName}
resetPasswordLink${resetPasswordLink}
unlockAccountLink${unlockAccountLink}
pushVerifyActivationLink${pushVerifyActivationLink}

Functions

In addition to customizing your EL expressions, you can use the following functions within each of the email templates. Although you can use each variable within any function, the variable must match the data type of the function. For example, you cannot use a string variable under the formatTimeDiffHourNow() function because the data must be an integer.

The following functions are provided:

ExpressionDefinition

replace(String input, String matchString, String replacement)

Replaces all occurrences of the match string with the replacement string.

substringAfter(String input, String matchString)

Returns the substring after the given match string, or an empty string if the matchString doesn't match the input.

substringBefore(String input, String matchString)

Returns the substring before the given match string, or an empty string if the matchString doesn't match the input.

toLowerCase(String input)

Converts the given input string to all lowercase.

toUpperCase(String input)

Converts the given input string to all uppercase.

substring(String input, int startIndex, int endIndex)

Extracts a range of characters from the given input string.

formatTimeDiffHoursNow(int hours)

Produces a formatted duration string for the given number of hours.

formatTimeDiffHoursNowInUserLocale(int hours)Produces a localized formatted duration string for the given number of hours.

formatTimeDiffDateNow(Date date)

Produces a formatted duration string for the given date.

formatTimeDiffDateNowInUserLocale(Date date)Produces a localized formatted duration string for the given date.

escapeHtml(String html)

Escapes the characters in a String using HTML entities.

escapeHtmlAttr(String html)

Encodes data for use in HTML attributes.



SMS Tab

You can customize the text of the SMS messages that are sent to your end users for MFA verification. Although Okta supports many variables for use in email templates, SMS messages only support ${code} (required) and ${org.name} (optional).

Edit the Okta Standard SMS (Default)

To view the Standard SMS message, click the Default expand button. The default message is: Your verification code is ${code}.

  1. In Custom Language, click the pencil icon under Actions.
  2. Edit the text of the default SMS message. Include the required variable ${code} (${org.name} is optional).
  3. Click Save.

Customize the SMS message with Translation (Language)

You can change language of the SMS message that is sent to your end users.

  1. Under Custom Language, click Add Translation.
  2. Select a language from the Language drop-down menu.
  3. Using the chosen language, enter a message in the field. Include the required variable ${code} (${org.name} is optional).
  4. Click Add Translation when done.

The custom language is shown under Default. Your customization is saved and you are no longer using the default Okta message.

To reset the message back to the Okta Standard SMS message, click Reset to Default and follow the prompts.

When crafting your custom message, keep the following in mind:

  • The maximum length of the message is 160 characters.
  • The OTP placeholder, ${code}, is included in the message length count.
  • The message can only include alphanumeric and punctuation characters. Avoid using special characters.



Post a Comment