Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Are MSO conditionals still necessary for Outlook versions greater than Outlook 2016

According to this page, there are only MSO conditionals for Outlook versions up to Outlook 2016. Does that mean they are only used for backwards compatibility?

If the answer to the first question is yes and you’re not aiming for Outlook backwards compatibility. Is it still necessary to use MSO conditionals when generating e-mails?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

MSO conditionals, or conditional comments, are only supported in the Outlooks on Windows using Word’s rendering engine. This started in Outlook 2007 up to the latest versions of Outlook 2021. Versions up to 2016 had a unique version number that made them easy to be uniquely targeted. But they stop incrementing that version number after Outlook 2016, so it’s no longer possible to target a specific version of Outlook on Windows after Outlook 2016.

As an email developer, I still rely on conditional comments a lot. Because Word as a rendering engine is so tricky, it’s best to feed it <table>s. For example, I will have a fluid layout based on a <div> for most email clients by default. But because Outlook on Windows (using Word’s rendering engine) don’t support things like max-width on div elements, I’ll wrap this with a conditional comment and a fixed width table for The Outlooks.

<!--[if mso]>
<table border="0" cellpadding="0" cellspacing="0" align="center" style="width:600px;" role="presentation"><tr><td>
<![endif]-->
<div style="width:100%; max-width:600px; margin:0 auto;">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
    tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam.
</div>
<!--[if mso]>
</td></tr></table>
<![endif]-->

Microsoft is currently transitioning away from Word and the latest versions of Outlook on Windows use EdgeView as a rendering layer, thus no longer supporting conditional comments. As long as users still use Outlook versions on Windows running on Word’s rendering engine, I will continue to use conditional comments in HTML emails and I recommend to do so.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading