I am email template designed which contains a Banner Image. Everything is aligned perfectly except the banner. Below is my code snippet and output what I am receiving.
<p><img src="medical.jpg" width="100%" height="144" /></p>
<p> </p>
<p><span style="font-family: 'museo-sans', sans-serif;"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">Hello</span></span>
</span>
</p>
<table style="width: 100%;">
<tbody>
<tr>
<td style="height: 40px;" colspan="5">
<p><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">You Project(${URI_REF}) has been submitted and is being reviewed by <strong>${u_project_manager}</strong>.</span></span>
</p>
<p> </p>
</td>
</tr>
<tr>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="5"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Title</strong></span></span>
</td>
</tr>
<tr>
<td style="color: black;" colspan="5"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">${short_description}</span></span>
</td>
</tr>
<tr>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="3"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Submitted by</strong></span></span>
</td>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Approver</strong></span></span>
</td>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Department</strong></span></span>
</td>
</tr>
<tr>
<td style="color: black;" colspan="3"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">${submitter}</span></span>
</td>
<td style="color: black;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">${u_project_manager}</span></span>
</td>
<td style="color: black;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">${department}</span></span>
</td>
</tr>
</tbody>
</table>
<hr />
<p><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;">Thank you,<br /></span><span style="font-family: 'Montserrat', sans-serif;">IT Service Desk</span></span>
</p>
<p> </p>
Output:
In my Gmail it is working perfectly fine but when it comes to outlook it is not working fine
Output:
Gmail Output
Outlook Output
In the Outlook the complete page itself displays the banner but in gmail it looks Okay. Am I doing anything wrong?
Remove the height and change the width of 100% for the image to the width of your email.
Example:
<p><img src="medical.jpg" width="100%" height="144" /></p>
should be:
<p><img src="medical.jpg" width="600" /></p>
The width of 600 pixels will be the width of your email. Height attribute can be dropped because if you assign a width to an image, height is proportionate. Don't use width in style tag, Outlook ignores it.
Also by default if you are using retina images (or really big ones) Outlook will resize the image to its original dimensions if it does not find a width attribute.
Try using height property in percent, something like 35% or use 144px
<img src="medical.jpg" width="100%" height="144px" />
or
<img src="medical.jpg" width="100%" height="35%" />
Related
I have a banner image added to the notification and dimension i set and Width: 100% & height: auto which is working fine in Mobile, Gmail but not working properly in Outlook.
My sample code:
<p> </p>
<p><img style="align: baseline;" title="" src="sampleimage.jpgx" alt="" width="100%" height="auto" align="baseline" border="" hspace="" vspace="" /></p>
<p> </p>
<table style="width: 100%;">
<tbody>
<tr>
<td style="height: 40px;" colspan="5">
<p> </p>
<p>Your request is submitted (${number}).</p>
<p> </p>
</td>
</tr>
<tr>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="5"><strong>Title</strong></td>
</tr>
<tr>
<td style="color: black;" colspan="5">${short_description}</td>
</tr>
<tr>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="3"><strong>Submitted by</strong></td>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="1"><strong>Approver</strong></td>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="1"><strong>Department</strong></td>
</tr>
<tr>
<td style="color: black;" colspan="3">${submitter}</td>
<td style="color: black;" colspan="1">${u_project_manager}</td>
<td style="color: black;" colspan="1"><span style="font-family: museo-sans, sans-serif;">${department}</span> </td>
</tr>
<tr>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="5"><strong>Business case </strong></td>
</tr>
<tr>
<td style="color: black;" colspan="5">
<p>${business_case}</p>
<p> </p>
</td>
</tr>
</tbody>
</table>
<hr />
<p><span style="font-size: 10pt;"><span style="font-family: 'Montserrat', sans-serif;">Thank you,</span><br /></span></p>
<p> Service Desk</p>
<p> </p>
I want to resize the banner image size, if i set the width & height with some values the image quality is getting disturbed and getting different outputs in different systems majorly on IOS & Outlook
I have an Email Template which is working fine for all Gmail, Yahoo etc. But in Outlook it is not working. Can anyone please help me how to make it visible on Outlook.
<div style="border: 2px solid grey; border-radius: 5px; padding: 20px;">
<p><span style="font-family: 'museo-sans', sans-serif;"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">Hello</span></span></span></p>
<p> ${mail_script:notification_logo}</p>
<table style="width: 100%;">
<tbody>
<tr>
<td style="height: 40px;" colspan="5">
<p><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">You Project(${URI_REF}) has been submitted and is being reviewed by <strong>${u_project_manager}</strong>.</span></span></p>
<p> </p>
</td>
</tr>
<tr>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="5"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Title</strong></span></span></td>
</tr>
<tr>
<td style="color: black;" colspan="5"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">${short_description}</span></span></td>
</tr>
<tr>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="3"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Submitted by</strong></span></span></td>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Approver</strong></span></span></td>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Department</strong></span></span></td>
</tr>
<tr>
<td style="color: black;" colspan="3"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">${submitter}</span></span></td>
<td style="color: black;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">${u_project_manager}</span></span></td>
<td style="color: black;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">${department}</span></span></td>
</tr>
</tbody>
</table>
<hr />
<p> </p>
<p><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;">Thank you,<br /></span><span style="font-family: 'Montserrat', sans-serif;">IT Service Desk</span></span></p>
<p> </p>
</div>
Only Outlook on IOS devices supports border-radius.
The Windows version out Outlook does not support border-radius since it uses Microsoft Word as its processor.
see camapaign monitor:
https://www.campaignmonitor.com/css/box-model/border-bottom/
Although you can try the below code, if it helps solving your problem.
<body>
<table cellspacing="0" cellpadding="0">
<tr>
<td width="300" height="40" style="-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; color: #ffffff; display: block;background-color:#000;text-align:center;">
<a href="http://www.google.com/" style="color: #ffffff; font-size:16px; font-weight: bold; font-family:sans-serif; text-decoration: none; line-height:40px; width:100%; display:inline-block">
Test
</a>
</td>
</tr>
</table>
<br/>
<br/>
<br/>
<div style="border: 2px solid grey;-webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; padding: 20px;">
<p><span style="font-family: 'museo-sans', sans-serif;"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">Hello</span></span>
</span>
</p>
<p>Lorem ipsum </p>
<table style="width: 100%;">
<tbody>
<tr>
<td style="height: 40px;" colspan="5">
<p><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">You Project( Lorem ipsum ) has been submitted and is being reviewed by <strong>Lorem ipsum </strong>.</span></span>
</p>
<p> </p>
</td>
</tr>
<tr>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="5"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Title</strong></span></span>
</td>
</tr>
<tr>
<td style="color: black;" colspan="5"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">Lorem ipsum </span></span>
</td>
</tr>
<tr>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="3"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Submitted by</strong></span></span>
</td>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Approver</strong></span></span>
</td>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Department</strong></span></span>
</td>
</tr>
<tr>
<td style="color: black;" colspan="3"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">Lorem ipsum </span></span>
</td>
<td style="color: black;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">Lorem ipsum </span></span>
</td>
<td style="color: black;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">Lorem ipsum </span></span>
</td>
</tr>
</tbody>
</table>
<hr />
<p> </p>
<p><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;">Thank you,<br /></span><span style="font-family: 'Montserrat', sans-serif;">IT Service Desk</span></span>
</p>
<p> </p>
</div>
</body>
I have a email template designed which contains a Banner Image & tables rows etc. Everything is aligned perfectly. But i want to set everything in a single border.
Below is my code snippet and output what I am receiving, can anyone please help me how to achieve.
<p><img src="medical.jpg" width="100%" height="144" /></p>
<p> </p>
<p><span style="font-family: 'museo-sans', sans-serif;"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">Hello</span></span>
</span>
</p>
<table style="width: 100%;">
<tbody>
<tr>
<td style="height: 40px;" colspan="5">
<p><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">You Project(${URI_REF}) has been submitted and is being reviewed by <strong>${u_project_manager}</strong>.</span></span>
</p>
<p> </p>
</td>
</tr>
<tr>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="5"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Title</strong></span></span>
</td>
</tr>
<tr>
<td style="color: black;" colspan="5"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">${short_description}</span></span>
</td>
</tr>
<tr>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="3"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Submitted by</strong></span></span>
</td>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Approver</strong></span></span>
</td>
<td style="background-color: #e6e7e8; color: #396b53;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;"><strong>Department</strong></span></span>
</td>
</tr>
<tr>
<td style="color: black;" colspan="3"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">${submitter}</span></span>
</td>
<td style="color: black;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">${u_project_manager}</span></span>
</td>
<td style="color: black;" colspan="1"><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 300;">${department}</span></span>
</td>
</tr>
</tbody>
</table>
<hr />
<p><span style="font-family: 'museo-sans', sans-serif;"><span style="font-weigth: 500;">Thank you,<br /></span><span style="font-family: 'Montserrat', sans-serif;">IT Service Desk</span></span>
</p>
<p> </p>
Here is code. hope it will help you.If any changes please let me know.
https://jsfiddle.net/rfx2jkc1/
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<style type="text/css">
.main-table {
width: 640px;
margin: 0 auto;
}
.logo-table {
width: 100%;
padding-bottom: 10px;
}
.content-table {
width: 100%;
}
.content-area {
background-color: #fff;
border: 1px solid #ccc;
padding: 20px;
}
.content {
background-color: #fff;
padding: 20px;
font-family: "Segoe UI", Arial;
font-size: 0.9em;
color: #111111;
}
.content table {
font-family: "Segoe UI", Arial;
font-size: 0.9em;
color: #111111;
border: 0
}
.receiverName {
font-family: "Segoe UI", Arial;
font-size: 1.1em;
color: #006699;
font-weight: lighter;
}
.senderName {
display: block;
}
.customer-password {
display: none;
}
.template-table {
border-collapse: collapse;
}
.template-table td {
border-top: 1px solid #ccc;
padding: 10px
}
.template-table td:last-child {
border-bottom: 1px solid #ccc;
}
.border-bottom {
border-bottom: 1px solid #ccc
}
.padding0 {
padding: 0;
}
</style>
</head>
<body>
<table class="main-table" border="0" cellpadding="0" cellspacing="0">
<tr>
<td> </td>
</tr>
<tr>
<td class="content-area">
<table class="logo-table" border="0" cellspacing="0" cellpadding="10">
<tr>
<td bgcolor="#0693ce" align="center">
<img src="#" width="200" />
</td>
</tr>
</table>
<table class="content-table" border="0" cellpadding="0" cellspacing="0">
<tr>
<td class="content">
<div>Hello [CustomerName],</div>
<br />
<p align="center"><strong>
<font color="#000000" size="3" face="Segoe UI, Arial">Congratulations! You have created user with below credentials on
[ABCProviderName] CSP Portal.</font>
</strong>
</p>
<br />
<table width="100%" cellpadding="5" cellspacing="1" bgcolor="#cccccc" class="template-table">
<tr bgcolor="#fff">
<td align="left" width="30%">
<strong>
<font color="#000000" size="2" face="Segoe UI, Arial">UserName</font>
</strong>
</td>
<td align="right" width="70%">
<font color="#000000" size="2" face="Segoe UI, Arial">[EmailID]</font>
</td>
</tr>
<tr bgcolor="#fff">
<td align="left" width="30%">
<strong>
<font color="#000000" size="2" face="Segoe UI, Arial">Password</font>
</strong>
</td>
<td align="right" width="70%">
<font color="#000000" size="2" face="Segoe UI, Arial">[Password]</font>
</td>
</tr>
</table>
<br />
<br />
<br />
<span>Thank You,</span>
<br />
<span class="senderName">[ABCProviderName] CSP.</span>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
I have designed a Email Template that we are going to use for one of our client. When i see it from the System Preview i am able to see the color but once email is received the format is set but color is not visible it is displaying as Black & White photo without any colors in the body.
Below is my CSS Code:
<p style="text-align: left;"><span style="font-family: cambria;"> <span style="font-size: 18pt;"> <span style="color: #00629f;">IBM Service Desk</span> </span> </span> <span style="font-family: cambria;"> <img style="align: right;" title="" src="sys_attachment.do?sys_id=0d50b5462f49c010209857892799b644" alt="" width="60" height="60" align="right" border="" hspace="" vspace="" /></span></p>
<style><!--
table {
font-family: cambria;
}
td.bg1{
background-color:#E2E2E3;
color:#00629F;
}
td.bg2{
color:black;
}
--></style>
<table style="width: 100%;">
<tbody>
<tr>
<td style="height: 40px;" colspan="5">
<p>Click here to view Incident: ${URI_REF}</p>
</td>
</tr>
<tr>
<td class="bg1" colspan="5">Short Description</td>
</tr>
<tr>
<td class="bg2" colspan="5">${short_description}</td>
</tr>
<tr>
<td class="bg1" colspan="5">Description</td>
</tr>
<tr>
<td class="bg2" colspan="5">${description}</td>
</tr>
</tbody>
</table>
<hr />
<p><span style="font-family: cambria;"><span style="font-size: 12pt;">Thank you</span>,</span></p>
<p><span style="font-family: cambria;"><span style="font-size: 14pt;"><span style="color: #00629f;">IBM Service Desk</span> </span></span></p>
Output when i previewed in the System:
System Preview Email
Once it is received to outlook then the email i am getting as shown Outlook Email
There is no any big mistake in your code, Please arrange your code properly. Table data color not shown because the style property not consuming. In your code you put the style tag as alone, Please move your style tag into head tag. The code will be work fine.
<head>
<style>
table {
font-family: cambria;
}
td.bg1{
background-color:#E2E2E3;
color:#00629F;
}
td.bg2{
color:black;
}
</style>
</head
<body>
<p style="text-align: left;"><span style="font-family: cambria;"> <span style="font-size: 18pt;"> <span style="color: #00629f;">IBM Service Desk</span> </span> </span> <span style="font-family: cambria;"> <img style="align: right;" title="" src="sys_attachment.do?sys_id=0d50b5462f49c010209857892799b644" alt="" width="60" height="60" align="right" border="" hspace="" vspace="" /></span></p>
<style>
</style>
<table style="width: 100%;">
<tbody>
<tr>
<td style="height: 40px;" colspan="5">
<p>Click here to view Incident: ${URI_REF}</p>
</td>
</tr>
<tr>
<td class="bg1" colspan="5">Short Description</td>
</tr>
<tr>
<td class="bg2" colspan="5">${short_description}</td>
</tr>
<tr>
<td class="bg1" colspan="5">Description</td>
</tr>
<tr>
<td class="bg2" colspan="5">${description}</td>
</tr>
</tbody>
</table>
<hr />
<p><span style="font-family: cambria;"><span style="font-size: 12pt;">Thank you</span>,</span></p>
<p><span style="font-family: cambria;"><span style="font-size: 14pt;"><span style="color: #00629f;">IBM Service Desk</span> </span></span></p>
</body>
I am working on one project where I want to reassign a html text to a rich text control which is designed for web. This rich text control support html doc to display the record.
I am facing problem while uploading html with images as follows:
<font size=2 color="#000000" face="Arial">
<div>
<span style="font-size: 9pt; font-family: 'arial'; color: #000000;">Test Embedded Image </span>
<span style="font-size: 8pt; font-family: 'Arial'; color: #000000;">graphic</span>
</div>
<div>
<span style="font-size: 9pt; font-family: 'arial'; color: #000000;">Text after image sd</span>
<div><table width=538 border=1 cellpadding=0 bordercolor="#414141" cellspacing=0>
<tr valign=top>
<td width=180 valign=top><font size=2 color="#000000" face="Arial">
<div>
<span style="font-size: 9pt; font-family: 'arial'; color: #000000;">test </span>
</div>
</font>
</td>
<td width=178 valign=top><font size=2 color="#000000" face="Arial">
<div>
<img src="Image_1.PNG" width="166" height="238" border="0" alt="graphic"/>
</div>
</font>
</td>
<td width=178 valign=top><font size=2 color="#000000" face="Arial">
<div>
<img src="Image_2.PNG" width="166" height="238" border="0" alt="graphic"/>
</div>
</font>
</td>
</tr>
<tr valign=top>
<td width=180 valign=top><font size=2 color="#000000" face="Arial">
<div>
<img src="Image_3.PNG" width="166" height="238" border="0" alt="graphic"/>
</div>
</font>
</td>
<td width=178 valign=top><font size=2 color="#000000" face="Arial">
<div>
<span style="font-size: 8pt; font-family: 'Arial'; text-decoration: underline; color: #0066cc;"> xxx</span>
</div>
</font>
</td>
<td width=178 valign=top><font size=2 color="#000000" face="Arial">
<div>
<span style="font-size: 8pt; font-family: 'Arial'; text-decoration: underline; color: #0066cc;"> Web URL</span>
</div>
</font>
</td>
</tr>
</table>
</div>
But the images are replaced with the graphic text as shown in fig.
Can anyone tell me why this is happening?
The alt tag in img is set as graphic. It will show only if those images can't be found.Check the images if they are in right directory.
It's working in the FIDDLE here.