Skip to main content

Who is this article for?

Code42 for EnterpriseSee product plans and features
CrashPlan for Small Business 

CrashPlan for Small Business, no.

Code42 for Enterprise, yes.

Link: Product plans and features.

This article applies to Cloud.

Other available versions:

Version 6 | Version 5 | Version 4Link: What version am I on?

Code42 Support

Customize enterprise email templates

Who is this article for?

Code42 for EnterpriseSee product plans and features
CrashPlan for Small Business 

CrashPlan for Small Business, no.

Code42 for Enterprise, yes.

Link: Product plans and features.

This article applies to Cloud.

Other available versions:

Version 6 | Version 5 | Version 4Link: What version am I on?

Overview

Your Code42 environment sends email notifications for many types of events such as user backup status alerts, administrator backup status reports, and password recovery requests. These email notifications are based on standardized templates (.eml files) stored in your instance of the Code42 cloud.

This article describes how to customize the content of email templates using the Code42 API's email-text-customization  resource.

Considerations

API structure and syntax

Documentation

For documentation of the email-text-customization  resource, see the v4 API documentation in the Code42 API documentation viewer at https://www.crashplan.com/swagger/.

For more information about the Code42 API documentation viewer, see Code42 API documentation viewers. For more information about Code42 API syntax, see Code42 API syntax and usage.

Request URL

  • United States:
    • If you sign in to the Code42 administration console at https://console.us.code42.com/console, use: 
      https://authority-east-lb.us.code42.com/api/v4/email-text-customization/
    • If you sign in to the Code42 administration console at https://crashplan.com/console, use:
      https://www.crashplan.com/api/v4/email-text-customization/
  • Ireland: https://default-primary.ie.code42.com/api/v4/email-text-customization/

Emails that you can customize

You can customize the text in the following emails using the email-text-customization  API resource. These example emails show the default email text. 

You can customize the following portions of these emails:

  • Sender email address on every email
  • Heading (title) and body of the backup alert email
  • Body of the backup report email
  • Body of password reset emails
  • Footer that appears at the bottom of every email

Backup status report

A backup status report email is automatically sent to Code42 administrators on a regular schedule to keep them informed about the status of devices in their Code42 environment. To set the schedule, use Send backup report in the organization settings.
Backup status report email

Backup alert

A backup alert alert email is sent to users whose devices have not backed for a set number of days. By default, an email with "Warning" in the subject line is sent if a device has not backed up in 3 days, and an email with "Critical" in the subject line is sent if a device has not backed up in 5 days. Set the number of days with the Alerts organization setting or the Alerts device backup defaults setting.
Backup alert email

Reset your password (user-initiated)

If users forget their Code42 password, they can click the Forgot Password link on the Code42 app sign-in page. When they do, a password reset email is sent to them.
Reset your password - user initiated

Reset your password (administrator-initiated)

A password reset email is sent to users whose administrators select Reset Password from the action menu on the user's account details page.
Reset your password - administrator initiated

Customize email content

The example steps shown here use curl, a command-line tool on Linux and Mac for HTTP communication. Other tools are also available. 

To make the return values more readable, the API request examples here that produce output include the following to pipe the output to the Python JSON decoder:

| python -m json.tool

Step 1: Send yourself test emails

To see the emails available for text customization, send yourself test emails.

  1. Sign in to your administration console with your administrator credentials.
  2. Double-click the Code42 logo in the upper left to open the administration console command-line interface (CLI).
  3. Enter the following test.email  commands to send yourself test emails for each type of email template (.eml file) available for customization. Type the commands one-at-a-time to the CLI and press Enter.
    test.email /emails/templated/backup_alert_user.eml <username>
    test.email /emails/templated/backup_report_user.eml <username>
    test.email /emails/templated/user_initiated_password_reset.eml <username>
    test.email /emails/templated/admin_initiated_password_reset.eml <username>
    

Replace <username> with your Code42 username. The test emails are sent to the email address associated with your username. 

  1. Following is an example of a successful response.
    test.email /emails/templated/backup_alert_user.eml admin@example.com succeeded.

Step 2: View default email content

Email templates are composed of segments. You can view available segments by using the email-text-customization/view API resource.

  1. Adapt the following email-text-customization/view API request to view a list of all segments that you can customize. In the following example, replace admin@example.com:password with your username and password, and replace www.crashplan.com with the URL of your Code42 cloud instance.
    • Example API request:
      curl -vv -H "Content-Type: application/json" -H "Accept: application/json" -u "admin@example.com:password" "https://www.crashplan.com/api/v4/email-text-customization/view" | python -m json.tool
      
    • Following is an excerpt of successful response. Notice the text indicated with the "defaultContent" label. This is the default content that is used in the emails when the segments are not customized. To see this content as it appears in emails, see the email examples shown earlier in this article.
      {
        "metadata": {
          "date": "2019-02-04T11:01:44.129-06:00",
          "headers": []
        },
        "data": {
          "emailTextCustomizations": [
            {
              "category": "GLOBAL",
              "segment": "MESSAGE_FOOTER",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "This is a message from Code42.<br />100 Washington Avenue South Suite 2000,
              Minneapolis, MN, 55401 USA<br />&copy; 2019 Code42 Software, Inc. All rights reserved.",
            },
            {
              "category": "GLOBAL",
              "segment": "SENDER_EMAIL",
              "contentType": "EMAIL_ADDRESS",
              "defaultContent": "noreply@code42.com",
            },
            {
              "category": "BACKUP_ALERTS",
              "segment": "TITLE",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "<h1>Backup Alert!</h1><p>The following device has been unable to reach any backup
              destinations.  To reduce the risk of data loss, please follow the instructions below.</p>",
            },
            {
              "category": "BACKUP_ALERTS",
              "segment": "BODY",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "<h2>What to do:</h2><p>Ensure your device is connected and online.  
              Then launch the Code42 app and click <b>Run Backup Now</b>.</p><p>For more information,
              <a href=\"https://code42.com/r/support/con-settings-email-templates-backup-alert-cloud\">please see
              the documentation</a>.</p>",
            },
            {
              "category": "BACKUP_REPORTS",
              "segment": "BODY",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "<h1>Backup Status Report</h1><p>Below is a regular backup status report to
              keep you informed about the health of your devices' backups.</p><p>For more information,
              <a href=\"https://code42.com/r/support/con-settings-email-templates-backup-status-report-cloud\">
              please see the documentation</a>.</p>",
            },
            {
              "category": "PASSWORD_RESET_USER",
              "segment": "BODY",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "<h1>Reset Your Password</h1><p>You are receiving this email because you requested
              a password reset for your account. If you did not request a password reset, please contact us immediately.</p>
              <p>For more information,
              <a href=\"https://code42.com/r/support/con-settings-email-templates-reset-password-cloud\">please see
              the documentation</a>.</p><p>This link <b>can only be used once.</b></p>",
            },
            {
              "category": "PASSWORD_RESET_ADMIN",
              "segment": "BODY",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "<h1>Reset Your Password</h1><p>Your Code42 account administrator has requested
              a password reset for your account.<br />Click the following link to reset it.</p><p>For more information,
              <a href=\"https://code42.com/r/support/con-settings-email-templates-reset-password-cloud\">please see
              the documentation</a>.</p><p>This link <b>can only be used once.</b></p>",
            }
          ]
        }
      }
      

Step 3: Update the email content

You can update email content by specifying a JSON file containing your customizations. You can create a JSON file using a text editor.

The JSON file can use only the following HTML tags:

  • Headers: <h1> - <h6>
  • Paragraph: <p>
  • Link: <a href>
  • Line break: <br />
  • Formatting: <b>, <i>, <s>, <u>, <sup>, <sub>, <ins>, <del>, <strong>, <strike>, <tt>, <code>, <big>, <small>, <em>, <li>, <ul>, <ol>
  1. Copy the output from the preceding step and paste it into the editor you're using to create the JSON file. This will form the basis of your JSON file. Make sure to do the following:

    1. Remove the "contentType" sections.
    2. Rename the "defaultContent" sections to "content". 
    3. Only include those segments you want to customize. You can place a single segment in a JSON file, some segments, or all segments. 
  2. Enter the new content you want to use for the segments in the "content" sections. The following example, which we'll title updateAll.json, contains changes to all segments.
{
    "emailTextCustomizations": [
      {
        "category": "GLOBAL",
        "segment": "MESSAGE_FOOTER",
        "content": "This is a message from Example Corporation, 1234 Anywhere, USA. 
        Copyright: 2019 Example Corporation, Inc. All rights reserved."
      },
      {
        "category": "GLOBAL",
        "segment": "SENDER_EMAIL",
        "content": "noreply@example.com"
      },
      {
        "category": "BACKUP_ALERTS",
        "segment": "TITLE",
        "content": "<h1>You need to back up.</h1><p>The following device has been unable to reach any 
        backup destinations. Follow the instructions below.</p>"
      },
      {
        "category": "BACKUP_ALERTS",
        "segment": "BODY",
        "content": "<h2>What to do:</h2><p>Ensure your device is connected and online.  
        Then launch the Code42 app and click <b>Run Backup Now</b>.</p>
        <p>If you need additional help, Call Example Corporation's IT help line.</p>"
      },
      {
        "category": "BACKUP_REPORTS",
        "segment": "BODY",
        "content": "<h1>Backup Status Report</h1><p>Below is the backup status of devices.</p>"
      },
      {
        "category": "PASSWORD_RESET_USER",
        "segment": "BODY",
        "content": "<h1>Reset Your Password</h1><p>You are receiving this email because you requested 
        a password reset for your account. If you did not request a password reset, please contact us immediately.</p>
        <p>This link <b>can only be used once.</b></p>"
      },
      {
        "category": "PASSWORD_RESET_ADMIN",
        "segment": "BODY",
        "content": "<h1>Reset Your Password</h1><p>Your Code42 account administrator has requested 
        a password reset for your account. Click the following link to reset it.</p><p>This link can only be used once.</p>"
      }
    ]
  }
  1. Adapt the following email-text-customization/update  API request to update the segments per the JSON file you created. Place the JSON file in the directory from which you run this command, or provide the full path in the "@" command. Remember to replace admin@example.com:password with your username and password, and replace www.crashplan.com with the URL of your Code42 cloud instance.
    • Example API request using our updateAll.json file:
      curl -vv -H "Content-Type: application/json" -H "Accept: application/json" -u "admin@example.com:password" -d "@updateAll.json" "https://www.crashplan.com/api/v4/email-text-customization/update"
      
    • Following is an example of a successful response.
      > POST /api/v4/email-text-customization/update HTTP/1.1
      > Host: www.crashplan.com
      > Authorization: Basic anBhZG1pbkBleGFtcGxlLmNvbTpqcGFkbWlu
      > User-Agent: curl/7.47.0
      > Content-Type: application/json
      > Accept: application/json
      > Content-Length: 1740
      > Expect: 100-continue
      > 
      < HTTP/1.1 100 Continue
      } [1740 bytes data]
      * We are completely uploaded and fine
      < HTTP/1.1 204 No Content
      
  2. Re-run the email-text-customization/view API request to view your customized email content.
    • Example API request:
      curl -vv -H "Content-Type: application/json" -H "Accept: application/json" -u "admin@example.com:password" "https://www.crashplan.com/api/v4/email-text-customization/view" | python -m json.tool
      
    • Following is an example of a successful response. Notice that the customized content that we specified in our updateAll.json file is shown with the "customizedContent" label.
      {
        "metadata": {
          "date": "2019-02-04T11:01:44.129-06:00",
          "headers": []
        },
        "data": {
          "emailTextCustomizations": [
            {
              "category": "GLOBAL",
              "segment": "MESSAGE_FOOTER",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "This is a message from Code42.<br />100 Washington Avenue South Suite 2000, 
              Minneapolis, MN, 55401 USA<br />&copy; 2019 Code42 Software, Inc. All rights reserved.",
              "customizedContent": "This is a message from Example Corporation, 1234 Anywhere, USA. 
              Copyright: 2019 Example Corporation, Inc. All rights reserved."
            },
            {
              "category": "GLOBAL",
              "segment": "SENDER_EMAIL",
              "contentType": "EMAIL_ADDRESS",
              "defaultContent": "noreply@code42.com",
              "customizedContent": "noreply@example.com"
            },
            {
              "category": "BACKUP_ALERTS",
              "segment": "TITLE",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "<h1>Backup Alert!</h1><p>The following device has been unable to reach any backup 
              destinations.  To reduce the risk of data loss, please follow the instructions below.</p>",
              "customizedContent": "<h1>You need to back up.</h1><p>The following device has been unable to reach 
              any backup destinations. Follow the instructions below.</p>"
            },
            {
              "category": "BACKUP_ALERTS",
              "segment": "BODY",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "<h2>What to do:</h2><p>Ensure your device is connected and online.  
              Then launch the Code42 app and click <b>Run Backup Now</b>.</p><p>For more information, 
              <a href=\"https://code42.com/r/support/con-settings-email-templates-backup-alert-cloud\">please see 
              the documentation</a>.</p>",
              "customizedContent": "<h2>What to do:</h2><p>Ensure your device is connected and online.  
              Then launch the Code42 app and click <b>Run Backup Now</b>.</p>
              <p>If you need additional help, Call Example Corporation's IT help line.</p>"
            },
            {
              "category": "BACKUP_REPORTS",
              "segment": "BODY",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "<h1>Backup Status Report</h1><p>Below is a regular backup status report to 
              keep you informed about the health of your devices' backups.</p><p>For more information, 
              <a href=\"https://code42.com/r/support/con-settings-email-templates-backup-status-report-cloud\">
              please see the documentation</a>.</p>",
              "customizedContent": "<h1>Backup Status Report</h1><p>Below is the backup status of devices.</p>"
            },
            {
              "category": "PASSWORD_RESET_USER",
              "segment": "BODY",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "<h1>Reset Your Password</h1><p>You are receiving this email because you requested 
              a password reset for your account. If you did not request a password reset, please contact us immediately.</p>
              <p>For more information, 
              <a href=\"https://code42.com/r/support/con-settings-email-templates-reset-password-cloud\">please see 
              the documentation</a>.</p><p>This link <b>can only be used once.</b></p>",
              "customizedContent": "<h1>Reset Your Password</h1><p>You are receiving this email because you 
              requested a password reset for your account. If you did not request a password reset, please contact us 
              immediately.</p><p>This link <b>can only be used once.</b></p>"
            },
            {
              "category": "PASSWORD_RESET_ADMIN",
              "segment": "BODY",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "<h1>Reset Your Password</h1><p>Your Code42 account administrator has requested 
              a password reset for your account.<br />Click the following link to reset it.</p><p>For more information, 
              <a href=\"https://code42.com/r/support/con-settings-email-templates-reset-password-cloud\">please see 
              the documentation</a>.</p><p>This link <b>can only be used once.</b></p>",
              "customizedContent": "<h1>Reset Your Password</h1><p>Your Code42 account administrator has 
              requested a password reset for your account. Click the following link to reset it.</p>
              <p>This link can only be used once.</p>"
            }
          ]
        }
      }
      

Step 4: Verify that emails use your customized content

You can confirm that your customized content displays properly in emails by sending yourself test emails. 

  1. Sign in to your administration console with your administrator credentials.
  2. Double-click the Code42 logo in the upper left to open the administration console command-line interface (CLI).
  3. Enter the following test.email  commands to send yourself test emails for each type of email template (.eml file) available for customization. Type the commands one-at-a-time to the CLI and press Enter.
    test.email /emails/templated/backup_alert_user.eml <username>
    test.email /emails/templated/backup_report_user.eml <username>
    test.email /emails/templated/user_initiated_password_reset.eml <username>
    test.email /emails/templated/admin_initiated_password_reset.eml <username>
    

In the example, replace <username> with your Code42 username. The test emails are sent to the email address associated with your username.

  1. Following is an example of a successful response.
    test.email /emails/templated/backup_alert_user.eml admin@example.com succeeded.
  2. Open and review the test email to ensure the customized content is correct.
  3. If any changes are needed, make adjustments in your update JSON file and re-run the email-text-customization/update  API.

Remove customized email content

You can remove customized content from email segments with the email-text-customization/remove  API. Those email segments from which you remove customized content revert to using the default email content. 

  1. Create a JSON file that contains the list of the email segments from which you want to the remove customized content. The following example reverts all segments. We'll name our example JSON file removeAll.json. 
{
    "emailTextCustomizations": [
      {
        "category": "GLOBAL",
        "segment": "MESSAGE_FOOTER"
      },
      {
        "category": "GLOBAL",
        "segment": "SENDER_EMAIL"
      },
      {
        "category": "BACKUP_ALERTS",
        "segment": "TITLE"
      },
      {
        "category": "BACKUP_ALERTS",
        "segment": "BODY"
      },
      {
        "category": "BACKUP_REPORTS",
        "segment": "BODY"
      },
      {
        "category": "PASSWORD_RESET_USER",
        "segment": "BODY"
      },
      {
        "category": "PASSWORD_RESET_ADMIN",
        "segment": "BODY"
      }
    ]
}
  1. Adapt the following email-text-customization/remove  API request to remove the customized content for the email segments specified in the JSON file you created. Place the JSON file in the directory from which you run this command, or provide the full path in the "@" command. In the following example, remember to replace admin@example.com:password with your username and password, and replace www.crashplan.com with the URL of your Code42 cloud instance.
  • Example API request:
    curl -vv -H "Content-Type: application/json" -H "Accept: application/json" -u "admin@example.com:password" -d "@removeAll.json" "https://www.crashplan.com/api/v4/email-text-customization/remove"
    
  • Excerpt of successful response:
    > POST /api/v4/email-text-customization/remove HTTP/1.1
    > Host: www.crashplan.com
    > Authorization: Basic anBhZG1pbkBleGFtcGxlLmNvbTpqcGFkbWlu
    > User-Agent: curl/7.47.0
    > Content-Type: application/json
    > Accept: application/json
    > Content-Length: 173
    > 
    } [173 bytes data]
    * upload completely sent off: 434 out of 434 bytes
    < HTTP/1.1 204 No Content
    
  1. Re-run the email-text-customization/view API request to view the reverted email content. 
    • Example API request:
      curl -vv -H "Content-Type: application/json" -H "Accept: application/json" -u "admin@example.com:password" "https://www.crashplan.com/api/v4/email-text-customization/view" | python -m json.tool
      
    • Notice that in the output there are no email segments with the "customizedContent" label. Instead, they only show the "defaultContent" label. The following excerpt shows the first two segments in the output:
      {
        "metadata": {
          "date": "2019-02-04T11:01:44.129-06:00",
          "headers": []
        },
        "data": {
          "emailTextCustomizations": [
            {
              "category": "GLOBAL",
              "segment": "MESSAGE_FOOTER",
              "contentType": "SIMPLIFIED_HTML",
              "defaultContent": "This is a message from Code42.<br />100 Washington Avenue South Suite 2000, 
              Minneapolis, MN, 55401 USA<br />&copy; 2019 Code42 Software, Inc. All rights reserved."
            },
            {
              "category": "GLOBAL",
              "segment": "SENDER_EMAIL",
              "contentType": "EMAIL_ADDRESS",
              "defaultContent": "noreply@code42.com"
            },
      
      ...
      
  • Was this article helpful?