Email Templates

When using the Janrain JavaScript Registration, Mobile SDK, or OAuth API endpoints, the Janrain servers can be configured to send emails in response to specific registration events.

Emails are always sent in a combined .html and .txt format. The customer is responsible for any customizations to the content of the email and coordinating these changes with his or her Janrain representative.

The following table lists the email events that are available to a customer’s Registration configuration. The events marked as Standard are enabled by default. The other events require specific and unique customizations to a Registration configuration and must be enabled through discussion with a Janrain representative.

Email Event Standard Email-specific JTL URL Event Description
new_email_verification Yes {*email_verification_url*} Sent when a user registers with an unverified email address. The JTL tag corresponds to the verify_email_url API client setting.
password_recover Yes {*password_recover_url*} Sent when a user selects to recover a forgotten password. The JTL tag corresponds to the password_recover_url API client setting.
resend_email_verification Yes {*email_verification_url*} Sent when the user selects to resend an email verification email that has either expired or was not received. The JTL tag corresponds to the verify_email_url API client setting.
email_change Yes {*email_verification_url*} Sent when a user changes his or her email address on the Edit Profile page. The JTL tag corresponds to the verify_email_url API client setting.
merge_verification No None Sent when a user merges a social profile into his or her main user record.
password_changed No None Sent when a user changes his or her password.
password_recover_unverified No None Sent when a user changes his or her password but the email address is unverified.
welcome_verified No None Sent when a user first registers on the site with an email address that is verified by a social provider.

Janrain Registration can perform string substitutions in the email body for additional variables referencing values from a specified entity type or from a Registration API client setting (configured through the Janrain dashboard in the Settings tab) within the email template. Include these variables by wrapping the schema attribute or setting the name as shown in the JTL wrappers below. The JTL URLs listed above may not be modified and do not need to be included within the {#settings} tag.

Example—Referencing a User Attribute

Welcome {#user}{displayName}{/user},

Example—Referencing a Registration API Client Setting

Thank you for joining {#settings}{site_name}{/settings}!

Using Registration API client settings allows email content elements to vary for different websites or applications that may share the same Registration configuration.

Encoding HTML Entities

Janrain Registration encodes HTML entities in the URLs by default. This is the desired behavior in an HTML email, though a text email should not encode entities. You can suppress the encoding by prefixing the variable with an ampersand (“&”) character.

Example—HTML Email


<a href="{email_verification_url}">Click here to verify your email address</a>.

Example—Text Email


Follow this link to verify your email address: {&email_verification_url}.

Note: All HTML email content should be sent with embedded CSS styles so that the content can be properly displayed in email client applications. You may want to research how best to prepare single-file HTML content for email transfers as the structure will be slightly different than a traditional HTML web page.