- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2017 02:23 PM
Hi Everyone,
I'm having a strange issue where I have a footer image (company logo) in my email notification. The image is in db_image and I've added it using the image button in the HTML Text Editor in the notification template. When I preview the notification, I see the footer image. When I actually submit a test Incident and view the email in the email client, I don't see the footer image.
Any ideas?
Solved! Go to Solution.
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2017 06:25 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2017 03:37 PM
Ah, I see two things. One, it's not a full URL, it's relative, so it's only going to work on the system (no good for an external email client.) The second is that it's getting the image from sys_attachment.
Step 1: Find out where that is being inserted in to your email message. It's either in the message itself, or in a mail script.
Step 2: Go to System UI> Images, find your image and open up the record. There will be an HTML snippet/annotation near the bottom of the form similar to this:
Step 3: Replace your src="sys_attachment.do?sys_id=..." part with the bits from the image record in step 2.
If you still encounter issues, prefix the image with /, ex: <img src="/my_image.png" ... />
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2017 03:57 PM
Thanks, I've tried the following code in my mail script. All without success.
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
template.print('<IMG SRC="full URL of the image here with the domain and instance information">');
})(current, template, email, email_action, event);
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
template.print('<img src="EmailFooterCompanyLogo.png" width="499" height="85"/>');
})(current, template, email, email_action, event);
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
template.print('<img src="/EmailFooterCompanyLogo.png" width="499" height="85"/>');
})(current, template, email, email_action, event);
This is the best that I get. The image should show up in that rectangle showing my screenshot.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2017 04:00 PM
Can you see the image (when not logged in - e.g. an incognito window or second browser) by going to
https://YOURINSTANCE.service-now.com/EmailFooterCompanyLogo.png
??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2017 04:02 PM
I just tried pulling the image up in a new icognito window and it did pull up just fine for me. I truly do appreciate your effort.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-10-2017 04:22 PM
Interesting. I had an action for you if it didn't work incognito.
So it appears that the email engine isn't doing what it is supposed to. Since Eureka, it would spot relative paths (like src="/myfile.png") and replace it with a full https://myinstance.service-now.com/myfile.png). It appears to not be doing that.
To verify, can you inspect the HTML from your email client and see if that translation was done? You may have to save the message to an external file.