The email templates are useful tools that help customers to be aware of different events such as account creation, purchase and the expiration of a membership, the beginning and end of a trip, etc. Sometimes the default settings are not enough to customize the email templates so having the capability to add HTML content helps to increase the personalization of an email. This self-help article explains the steps to follow in order to add HTML content to an Email template, as an example we will add a logo as a header of a template.
1.- Open COMET and log in to it, for example: https://<YOUR_CITY>-comet.publicbikesystem.net/home
2.- Go to "Management" → "System Settings" → "Notification" module.
3.- Select the template you want to modify from the "List of Notifications". For this example we will work on the template ID 45, click on the template ID.
4.- Go to the "Content" section and click on the "Edit" button.
5.- Once you click on the "Edit" button, some options will be enabled, please toggle the "Body Raw HTML" button on.
6.- This will change the view of the body field for the email template, you will see that the content is displayed as a part of an HTML document.
7.- Let's suppose that it's required to add an email header using the following image we could accomplish this task by adding the following HTML code at the top of the body.
<p>
<img src="https://bikesharetoronto.com/wp-content/themes/torontotheme/images/logo-header.png" alt="https://bikesharetoronto.com/wp-content/themes/torontotheme/images/logo-header.png" width="300" height="86">
</p>
This will add an image inside a <p> element, it's possible to use different kinds of HTML tags such as <p>, <img>, <div>, <ul>, <ol>, etc. For the sake of this example, we will use the <p> element and we will set a width of 300 and a height of 86. You can modify these properties and add more elements as long as they're HTML objects.
8.- Go to the "Content" section and click on the "Save" button.
9.- These changes will take effect immediately and they will be displayed on the body of the email template.
10.- If you want to send a preview of the email template to your own email, you can click on the "Send Preview" button at the top right corner of the screen.
Note: It's mandatory to save the content prior to sending the preview, if you send the preview without clicking the "Save" button, the changes won't be reflected.