Thursday, April 19, 2018

Email Rendering Issues in Outlook and Hacks to Save the Day

Note: This article was originally published on May 15 2017 and has been updated to accommodate the workarounds for Windows 10 Mail.

With a plethora of email clients available for end user and each one rendering emails in different ways, coding and designing an email has been a turmoil for email marketers. After Gmail and Apple mail, Microsoft Outlook is the next big player in the email industry.

Outlook has been a great influence for both B2C and B2B email messaging with its journey from being the first free email service to building variations of desktop mail programs. There are different versions of Outlook available for desktop, webmail and mobile environments and it is bundled under the moniker of ‘Windows Mail 10’ with Windows 10. Statistically, Windows 10 is now installed in 29.8% of global systems which means email developers need to address the issues faced in ‘Windows 10 Mail’ along with other Outlook versions.

New Call-to-action

As a marketer, building emails for Outlook can be a challenging task.

Here’s why…

After 2014, the number of emails opened on smartphones and tablets has increased, and since then, desktop emails have been replaced by mobile and web apps. Also, most marketers avoid sending emails via Outlook.

Major Pitfalls for Emails in Outlook and Windows Mail 10

Here are the key issues for building emails for Outlook & Windows Mail 10 and the workaround for them.

Background images not supported

There different types of backgrounds you can use in your emails.

  • Full body background
  • Pattern Background
  • Graphic Background
  • Section-wide background

Unfortunately Outlook 2007-2013 do not support any of the above backgrounds, but the ideal solution for rendering is by using VML (Vector Markup Language).

Input the below code in the <body> tag of your HTML for the background image to cover the entire email window.

<div style="background-color:#000000;">
<!--[if gte mso 9]>
<v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t">
<v:fill type="tile" src="IMAGE.png" color="#000000"/>
</v:background>
<![endif]-->
<table height="100%" width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td valign="top" align="left" background="IMAGE.png">

While this code worked wonders in displaying the background image to emails opened in Outlook 2007, 2010 and 2013. But Windows Mail 10 still faced issues and needed the code to be modified to add v:image with its source allowing the background image over the container using v:rect. Moreover, by adding properties such as opacity as 0% in v:fill enables the top layer to be transparent to allow new div with content in it and placing inline-block;position: absolute in v:rect the container position is fixed as a background.

<td valign="top" height="700" background="Image Live URL Here" bgcolor="#f7901e" style="height:700px; background-image:url(Image Live URL Here);background-color: #f7901e;">
  <!--[if gte mso 9]>
  <v:image xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style=" border: 0;display: inline-block; width: 550px; height: 700px;" src="Image Live URL Here" />
  <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style=" border: 0;display: inline-block;position: absolute; width: 550px; height: 700px;">
    <v:fill  opacity="0%" color="#f7901e"  />
    <v:textbox inset="0,0,0,0">
      <![endif]--> 
        <div>
                <!-- HTML Content Here -->
        </div>
      <!--[if gte mso 9]> 
    </v:textbox>
    </v:fill>
  </v:rect>
  </v:image>
  <![endif]-->
</td>

And in order to include a background pattern in an email you can upload the pattern onto ‘www.backgrounds.com‘ and get the readymade VML code. You can find more information regarding how to add background in Outlook emails in our blog titled “Background Images in Emails“.

Animated GIFs do not work

Newer versions of outlook (2003+) do not support animated GIF and instead display just the first frame of the animation.

Outlook freezes an animated GIF on its first frame and hence try creating a GIF that conveys the message in its first frame itself, which runs for just a few milli-seconds. You can have supporting slides having GIF frames for other email clients.

selfridges

Additionally you have a static image with the message which will replace the GIF when opened in Outlook using Outlook conditional coding.

During the initial release, Windows Mail 10 followed the tradition of only showing the first frame of an animated GIF. With later updates, the issue was patched up and currently Windows Mail 10 supports animated GIF.

Border-radius property

Border-radius property is one of the most commonly used CSS property but unfortunately it is supported in neither of the Outlook variants or in Windows 10 mail. Currently there is not workaround for the same and your subscribers shall have to do with square buttons.

GetResponse---II

Original Email CTA

GetResponse


An example where the rounded CTA button becomes a weird looking rectangle button

No support for position and float

Modern web and email development lets you use containers such as divs to structure content. Attributes such as position and float are used with the divs within an HTML code. Outlook or Windows 10 Mail don’t support these attributes.

To structure your emails that render across all major clients/browsers/devices, use tables to build emails. Think in terms of rows and columns to easily build emails with tables and stick with align=”left” property.

Links getting converted to purple or blue

When the emails are sent using HTML template from Outlook, all the links in the email turn to either blue or purple, with an underline. Regardless of what colored text is used, the blue/purple underline persists when viewed on different email clients.

To avoid this issue, use the <font> tag and wrap the text with a <span> tag and a style attribute. Use the following code:

<a style="color:#E3A216; text-decoration:none;">
<span style="color:#E3A216;">
<font color="#E3A216">
Click me
</font>
</span>
</a>

Outlook specific Workarounds

Additional padding below images

You may find additional space under the images in Outlook.com. A few pixels of additional padding is added below the images. To remove this floating space, add the below style:

style="display:block;"

Outlook-spacing-between-images

This removes the extra padding and gives predictable results for other email clients, too. However, the padding support does not work at span or anchor tag and works for table/td tag. This normally does not happen in Desktop version of Outlooks only in web version i.e. Outlook.com

DPI Scaling

There are chances that an email which renders well on your system may not work on your clients’ devices. Outlook has an issue with the DPI scaling, wherein any resolution of 1920×1080 and above will distort the layout of your email. This problem usually persists on Windows 10 where default setting is with 125% resolution rather than 100%.

DPI Scaling makes the following changes:

  • Widths and heights specified in HTML attributes remain pixel values.
  • Widths and heights specified in VML code remain pixel values.
  • Other pixel values (px) are converted to point (pt) values instead.

So a text of 10pt @ 150% desktop scaling would be equivalent in size to same text in 15pt @ 100% desktop scaling.

The workaround for this issue is to enable the VML code added in the <head> to scale as per the resolution and additionally have a table with absolute width (containing the email code) nested inside a table with relative width. You may refer to the complete solution in our blog titled “DPI Scaling in Outlook 2007-2013 – Achieving it like a pro!“.

Moreover it is a good practice to  test your emails in higher DPI before sending.

Additional page break

Outlook 2007-present use MS Word to render HTML emails and the email appears as it would in print preview- sometimes a white space is inserted above an image or sometimes the text in adjoining tables gets misaligned. This causes the display to look different from how it was actually designed and tested.

To eliminate the white space, reorganize the content, eliminate the nested tables that contain extra length. Remove unnecessarily used nested tables to reduce the length below 22 inches.

Rendering CSS issues

Since Outlook 2007 and above do not support CSS floats, CSS positioning, Flash or other plugins, you need to use XHTML instead of HTML. Moreover the CSS needs to be inlined as far as possible so that it is not stripped away.

Fallback font Rendering

In case the primary font is not available on the subscriber’s device, Outlook tends to render the entire email copy in Times New Roman, ignoring the specified fallback font. In such cases, you need to force Outlook to render the fallback font that is specified using a conditional code.

<!--[if mso]>

<style>
    h1 {
      font-family: Primary font, Fallback font;
    }
</style>

<![endif]-->

Did we miss something here? Do mention it in the comments and get in touch with us if you have email design and coding requirements.

EmailMonks design and code emails that render smoothly on all major email clients and browsers.

No comments:

Post a Comment