Templates

Notifications (emails and/or SMS) are sent to the User when they create a new account or add an identity to an existing account.

Emails

In order to be compatible with every email applications, Connect needs two versions of each email:

  • the raw version (only plain text, with no HTML),

  • and the HTML version.

You can personnalize the email as much as you want, with some requirements:

  • the tag {{code}} need to be present in the email since it will be replaced by the code the User has to enter,

  • you have to create a template and an email subject for every locale set in your Provider,

  • images used in the email must be absolute URLs (preferably from a CDN) and have a width and height set,

  • the email address of the sender will be specified at the Provider’s level.

Note
For the sender email address, we advise against using a "No Reply" email since it can be useful to have a way of seeing the emails that are sent back by Users to this email for support.
Note
If a template does not exist for the locale chosen by the user, then a fallback will be made to the english version of the email.

Here is an example of an HTML version of the template:

<table
  cellpadding="0"
  cellspacing="0"
  border="0"
  width="100%"
  style="width: 100%; margin-top: -1px"
  role="presentation"
>
  <tr>
    <td height="1" style="height: 1px; max-height: 1px; font-size: 1px; line-height: 1px">
      <span style="display: block; width: 640px; min-width: 640px">&nbsp;</span>
    </td>
  </tr>
  <tr>
    <td style="background-color: #ffffff">
      <table cellpadding="0" cellspacing="0" border="0" width="640" align="center" style="margin: auto; width: 640px">
        <tr>
          <td>
            <table
              cellpadding="0"
              cellspacing="0"
              border="0"
              width="320"
              align="center"
              style="margin: auto; width: 320px"
              role="presentation"
            >
              <tr>
                <td style="text-align: center">
                  <img
                    src="my_company_logo_Url"
                    alt="My company logo"
                    width="320"
                    height="320"
                    style="
                      font-family: Arial, Helvetica, sans-serif;
                      font-size: 13px;
                      color: #000000;
                      line-height: 13px;
                      display: block;
                      border: none;
                    "
                  />
                </td>
              </tr>
            </table>
            <table
              cellpadding="0"
              cellspacing="0"
              border="0"
              width="640"
              align="center"
              style="margin: auto; clear: both; width: 640px"
              role="presentation"
            >
              <tr>
                <td height="40" style="height: 40px; font-size: 40px; line-height: 40px">&nbsp;</td>
              </tr>
            </table>
            <table
              cellpadding="0"
              cellspacing="0"
              border="0"
              width="640"
              align="center"
              style="margin: auto; width: 640px"
              role="presentation"
            >
              <tr>
                <td
                  style="
                    font-family: Arial, Helvetica, sans-serif;
                    color: #000000;
                    text-align: center;
                    font-size: 17px;
                    padding-top: 10px;
                    padding-bottom: 10px;
                    vertical-align: middle;
                    font-weight: 700;
                  "
                >
                  Verification Code
                </td>
              </tr>
            </table>
            <table
              cellpadding="0"
              cellspacing="0"
              border="0"
              width="640"
              align="center"
              style="margin: auto; clear: both; width: 640px"
              role="presentation"
            >
              <tr>
                <td height="20" style="height: 20px; font-size: 20px; line-height: 20px">&nbsp;</td>
              </tr>
            </table>
            <table
              cellpadding="0"
              cellspacing="0"
              border="0"
              width="640"
              align="center"
              style="margin: auto; width: 640px"
              role="presentation"
            >
              <tr>
                <td
                  style="
                    font-family: Arial, Helvetica, sans-serif;
                    color: #000000;
                    text-align: center;
                    font-size: 16px;
                    padding-top: 10px;
                    padding-bottom: 10px;
                    vertical-align: middle;
                  "
                >
                  You used this email to log on to our website. Here is the code entered on My Company Connect :
                </td>
              </tr>
            </table>
            <table
              cellpadding="0"
              cellspacing="0"
              border="0"
              width="640"
              align="center"
              style="margin: auto; clear: both; width: 640px"
              role="presentation"
            >
              <tr>
                <td height="30" style="height: 30px; font-size: 30px; line-height: 30px">&nbsp;</td>
              </tr>
            </table>
            <table
              cellpadding="0"
              cellspacing="0"
              border="0"
              width="640"
              align="center"
              style="margin: auto; width: 640px"
              role="presentation"
            >
              <tr>
                <td
                  style="
                    font-family: Arial, Helvetica, sans-serif;
                    color: #000000;
                    text-align: center;
                    font-size: 20px;
                    padding-top: 10px;
                    padding-bottom: 10px;
                    vertical-align: middle;
                    font-weight: 700;
                  "
                >
                  {{code}}
                </td>
              </tr>
            </table>
            <table
              cellpadding="0"
              cellspacing="0"
              border="0"
              width="640"
              align="center"
              style="margin: auto; clear: both; width: 640px"
              role="presentation"
            >
              <tr>
                <td height="30" style="height: 30px; font-size: 30px; line-height: 30px">&nbsp;</td>
              </tr>
            </table>
            <table
              cellpadding="0"
              cellspacing="0"
              border="0"
              width="640"
              align="center"
              style="margin: auto; width: 640px"
              role="presentation"
            >
              <tr>
                <td
                  style="
                    font-family: Arial, Helvetica, sans-serif;
                    color: #000000;
                    text-align: center;
                    font-size: 16px;
                    padding-top: 10px;
                    padding-bottom: 10px;
                    vertical-align: middle;
                  "
                >
                  See you soon<br />
                  <span style="font-style: italic">My Company</span>
                </td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

SMS

You can personalize the SMS as much as you want but, keep in mind that:

  • the tag {{code}} need to be present in the SMS since it will be replaced by the code the User has to enter,

  • the sender is specified at the provider’s level

  • you have to create a template for every locale set in your Provider.

Note
If a template does not exist for the locale chosen by the user, then a fallback will be made to the english version.
Note
Keep in mind that the maximum length of a SMS message can depend on the charcarters you are using. If the message is longer than the limit, several SMS will be send and each one will be charged.

Here is an example of template for a SMS sent to the user:

"Hello,
To connect to the site please use the following code: {{code}}"
Table of Content