- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2020 03:47 AM
Hi All,
We have a requirement to display an image in email body (Not as attachment). Image displays properly when i preview email in service now but image is not seen in customer mail box.
Below is the logic currently used in email script - url is reference to sys_attachment table where image is located.
<img src=' + url + '>'
This is not able to fetch image from sys_attachment & load it on to email.
Kindly let me know how to implement this scenario.
Thanks.
Regards,
Anil KP
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2020 04:31 AM
Better create a business rule on insert on Attachment table when content type is Image/JPEG that copies the attachment to image (db_image) table & then use the above script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2020 04:17 AM
Hi Kaushik, Thanks for the reply but my requirement is not fixed image to be in email. I have to send image attached to incident in email. So i'm referring for image in sys_attachment table & constructing URL to this -
var url = gs.getProperty('custome_url') + "/sys_attachment.do?sysparm_referring_url=tear_off&view=true&sys_id=" + attachment ;
template.print(ind.getMessage("Customer Signature ", lang) +' '+ '<img src=' + url + '>' + "<br><br>" );
I can see image on body of email while preview but not in actual email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2021 10:58 PM
Hi Anil,
Have you implemented the functionality? I also have similar requirement. Want to display the images that are attached in the incidents on the email body. Can you help me.
Regards,
Arun