Retain HTML for inbound emails
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2016 10:45 AM
We would like to retain HTML formatting from inbound emails and insert them into the comments.
I placed the following code into the inbound email actions and I'm getting a result I don't expect.
BR: current.comments = '[code]' + email.body_html + '[/code]';
Result:
2016-03-09 13:31:59 - Scott Angehr Additional comments
lang="EN-US" link="blue" vlink="purple">
State | Type | Caller | Severity Level | Category | Short Description |
Active | Project | Justin Thyme | Standard | ServiceNow | Create Timesheet app tied with Project Mgmt |
Scott Angehr
ServiceNow Administrator
It includes part of the email header and I haven't been able to edit to exclude this.
Any thoughts would be greatly appreciated!
Thank you,
Scott

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2016 07:14 AM
Have you considered creating another 'Description' field of type HTML? Unless you need to utilize the journal field functionality.
I did this to handle HTML formatted emails like yours above; formatted tables, etc.
Cheers,
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2016 09:58 AM
Thank you for the response. The users wish to keep additional comments as their initial journal.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2016 11:50 PM
Hi,
I used the same code mentioned by you in my incident inbound action but its giving me complete HTML code rather than formatted one,
Please suggest.
current.comments = '[code]' + email.body_html + '[/code]';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2020 12:38 PM
This is an issue we are experiencing. When sending an HTML email to SNOW all the formatting is stripped from the email in the comment section.
Could someone please assist with this issue.