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:

Versions 6 and 7 | 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:

Versions 6 and 7 | 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 following Code42 API resources: 

  • email-text-customization 
    Customizes the text content of emails.
  • EmailLogoCustomization
    Customizes the co-branding logo that appears next to the Code42 logo in emails.

Considerations

Template changes are live
Changes you make to email templates using the procedures in the article are live in the production email system. There is no test area to verify your changes before going live.

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 documentation of the EmailLogoCustomization  resource, see the v3 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/
    • https://authority-east-lb.us.code42.com/c42api/v3/EmailLogoCustomization/
  • If you sign in to the Code42 administration console at https://www.crashplan.com/console, use:
    • https://www.crashplan.com/api/v4/email-text-customization/
    • https://www.crashplan.com/c42api/v3/EmailLogoCustomization/

Ireland

  • https://default-primary.ie.code42.com/api/v4/email-text-customization/
  • https://default-primary.ie.code42.com/c42api/v3/EmailLogoCustomization/

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 available for customization. Replace admin@example.com with your Code42 username. Type the commands one-at-a-time to the CLI and press Enter. The test emails are sent to the email address associated with the username. 
test.email <username> backup_alerts
test.email <username> backup_reports
test.email <username> password_reset_user
test.email <username> password_reset_admin  

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.

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.

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
  1. Re-run the email-text-customization/view API request to view your customized email content.
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 available for customization. Replace admin@example.com with your Code42 username. Type the commands one-at-a-time to the CLI and press Enter. The test emails are sent to the email address associated with the username. 
test.email <username> backup_alerts
test.email <username> backup_reports
test.email <username> password_reset_user
test.email <username> password_reset_admin
  1. Open and review the test emails to ensure the customized content is correct.
  2. 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.
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. 
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"
      },

...

Customize the email logo

You can use the  EmailLogoCustomization  API resource to insert your company's logo next to the Code42 logo in emails. Your logo must meet the following criteria:

  • Format: JPEG or PNG 
  • Maximum height: 36 pixels
  • Maximum width: 121 pixels

Add your logo

  1. Adapt the following request to place authorization credentials in a temporary "cookie jar" that will be used for the remainder of the logo customization requests. The cookie is good for 15 minutes before you need to make another authorization request by rerunning the command.

    In the following example, replace admin@example.com with your username, and replace www.crashplan.com with the URL of your Code42 cloud instance.

curl -vv -X GET -H "Accept: application/json" -u "admin@example.com" -c $TMPDIR/cookiejar "https://www.crashplan.com/c42api/v3/auth/jwt"

Following is an excerpt of successful response.

< HTTP/2 200 
< date: Mon, 04 Mar 2019 20:42:30 GMT
< content-length: 0
* Added cookie 
  1. Adapt the following API command to add a new logo. 

    In the following example, replace CompanyLogo.png with the name of your logo file. Place the logo file in the directory from which you run this command, or provide the full path in the "@" command. Replace www.crashplan.com with the URL of your Code42 cloud instance.

curl -vv -X POST -b $TMPDIR/cookiejar -H "Content-Type: multipart/form-data" --form "logo=@CompanyLogo.png" "https://www.crashplan.com/c42api/v3/EmailLogoCustomization"
  1. To verify that the logo was added successfully, adapt the following authorization request to retrieve the logo that is in the system. 

    In the following example, replace CopyOfMyCompanyLogo.png with the name of the file you want to hold the logo copy, and replace www.crashplan.com with the URL of your Code42 cloud instance.

curl -vv -X GET -b $TMPDIR/cookiejar -o CopyOfMyCompanyLogo.png "https://www.crashplan.com/c42api/v3/EmailLogoCustomization"

The logo is retrieved and placed into the file name you specified. The content type of the retrieved file is shown in the output as "Content-Type: image/png" for example. If the retrieved file is a different file type than specified in the file name, change the file name suffix after retrieval to the correct file type. 

  1. To confirm that your new logo displays properly in emails, 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 available for customization. Replace admin@example.com with your Code42 username. Type the commands one-at-a-time to the CLI and press Enter. The test emails are sent to the email address associated with the username. 
test.email <username> backup_alerts
test.email <username> backup_reports
test.email <username> password_reset_user
test.email <username> password_reset_admin  
  1. Open and review the test emails to ensure the logo displays correctly.

Update the logo

Adapt the following API command to update the logo. In the following example, replace NewCompanyLogo.png with the name of your logo file. Place the logo file in the directory from which you run this command, or provide the full path in the "@" command. Replace www.crashplan.com with the URL of your Code42 cloud instance.

curl -vv -X PUT -b $TMPDIR/cookiejar -H "Content-Type: multipart/form-data" --form "logo=@NewCompanyLogo.png" "https://www.crashplan.com/c42api/v3/EmailLogoCustomization"

Delete the logo

Adapt the following API command to delete your logo from the emails. In the following example, replace www.crashplan.com with the URL of your Code42 cloud instance. After you run this command, only the Code42 logo appears in the emails. 

curl -vv -X DELETE -b $TMPDIR/cookiejar "https://www.crashplan.com/c42api/v3/EmailLogoCustomization"
  • Was this article helpful?