Background Image Not Displaying in Outlook Emails Using ServiceNow Email Layout – Need Help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi All,
I am working on a custom HTML Email Layout in ServiceNow. The layout contains a header image, notification body, and footer image.
My requirement is to display the footer image as a background, with a description and a clickable SharePoint hyperlink positioned directly on top of the image.
The layout works as expected in the browser/email preview. However, when the notification email is received in Microsoft Outlook, the footer background image is not displayed. The footer text and hyperlink are visible, but the background image is missing.
I have written this code in email Layout :
<style type="text/css">
* {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
body {
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
font-family: Lato, Arial, sans-serif;
background-color: #F5F6F7;
}
table, td {
border-spacing: 0 !important;
border-collapse: collapse !important;
mso-table-lspace: 0pt !important;
mso-table-rspace: 0pt !important;
}
img {
display: block;
border: 0;
outline: none;
text-decoration: none;
max-width: 100%;
height: auto;
}
a {
text-decoration: none;
}
.email-container {
width: 100%;
max-width: 650px;
}
.main-content {
padding: 35px 24px;
background-color: #FFFFFF;
text-align: left;
}
.footer-text {
font-family: Arial, sans-serif;
font-size: 13px;
line-height: 22px;
color: #FFFFFF;
}
.footer-link {
color: #4FC3F7;
text-decoration: none;
}
#snc_notification_unsubscribe,
#snc_notification_preference {
color: #1955BE;
font-size: 12px;
line-height: 18px;
}
@media only screen and (max-width: 600px) {
.email-container {
width: 100% !important;
}
.main-content {
padding: 28px 16px !important;
}
.footer-content {
padding: 30px 16px !important;
}
}
</style>
<!-- HEADER -->
<table role="presentation" width="100%" cellspacing="0"
cellpadding="0" border="0"
style="width:100%; background-color:#F5F6F7;">
<tr>
<td align="center">
<table role="presentation" width="100%" cellspacing="0"
cellpadding="0" border="0"
class="email-container"
style="width:100%; max-width:650px;
background-color:#032D42;">
<tr>
<td>
<img src="request_completed_header.png"
alt="Global Travel Services"
width="650"
style="display:block; width:100%;
max-width:650px; height:auto;
border:0;" />
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- BODY -->
<table role="presentation" width="100%" cellspacing="0"
cellpadding="0" border="0"
style="width:100%; background-color:#FFFFFF;">
<tr>
<td align="center" style="padding:0 12px;">
<table role="presentation" width="100%" cellspacing="0"
cellpadding="0" border="0"
class="email-container"
style="width:100%; max-width:650px;
background-color:#FFFFFF;">
<!-- tr>
<td height="55"
style="height:55px; background-color:#032D42;
font-size:0; line-height:0;">
 
</td>
</tr-->
<tr>
<td class="main-content"
style="padding:35px 24px;
background-color:#FFFFFF;
text-align:left;">
${notification:body}
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="20"
style="height:20px; font-size:0; line-height:0;">
 
</td>
</tr>
</table>
<!-- UNSUBSCRIBE / PREFERENCES -->
<table role="presentation" width="100%" cellspacing="0"
cellpadding="0" border="0"
style="width:100%; background-color:#F5F6F7;">
<tr>
<td align="center"
style="padding:18px 10px 22px;
font-family:Arial,sans-serif;
font-size:12px; line-height:18px;">
${NOTIF_UNSUB} | ${NOTIF_PREFS}
</td>
</tr>
</table>
<!-- FOOTER -->
<table role="presentation" width="100%" cellspacing="0"
cellpadding="0" border="0"
style="width:100%; background-color:#F5F6F7;">
<tr>
<td align="center" style="padding:0 12px;">
<table role="presentation" width="100%"
cellspacing="0" cellpadding="0" border="0"
style="width:100%; max-width:650px;
background-color:#002B45;">
<tr>
<td align="center"
valign="middle"
background="request_completed_footer_01.png"
bgcolor="#002B45"
height="250"
class="footer-content"
style="height:250px;
background-color:#002B45;
background-image:url('request_completed_footer_01.png');
background-repeat:no-repeat;
background-position:center center;
background-size:100% 100%;
padding:35px 24px;">
<table role="presentation" width="100%"
cellspacing="0" cellpadding="0"
border="0"
style="width:100%; max-width:560px;">
<tr>
<td align="center"
class="footer-text"
style="color:#FFFFFF;
font-family:Arial,sans-serif;
font-size:13px;
line-height:22px;">
<strong>
If your query relates to immediate
travel, please contact the travel
management company. Out-of-hours
numbers for ATPI can be found on
your travel itinerary or by
accessing the Travel Hub via our
intranet page. You can also use
the chat function on the ATPI
On the Go app.
</strong>
<br /><br />
<a href="Link"
class="footer-link"
style="color:#4FC3F7;
text-decoration:none;">
Global Travel Services - Organization Home
</a>
<br /><br />
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
Can help on this how to fix this.
Thanks,
karishma.