Forward an email in Outlook shows hidden elements

Yavor_Todorov
Level 3

Forward an email in Outlook shows hidden elements

Hello everyone,

 

We are creating new Marketo email template and we want some sections to have the possibility to appear/dissapear with a boolean. For ex.:

<meta class="mktoBoolean" id="showBanner" mktoname="Show Banner" default="true" false_value="display:none; mso-hide:all;" true_value="display:inline-table;" false_value_name="Hidden" true_value_name="Shown" />

Then, in the code below, I am using the boolean as follows:

style="${showBanner}"

 

If I send an email sample or send the email to me via smart campaign, everything works great. 

 

The problem comes when I try to Forward/Reply to the email in Outlook - the banner just reappears and it is not hidden anymore.

 

What I've tested is the following(with no success):

<!--[if !mso]><!--> CONTENT <!--<![endif]--> 

 

Outlooks version is 2016, but I assume this bug appears in all versions.

 

Do you have any ideas how to fix this?

 

Thanks and best regards,

Yavor

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Forward an email in Outlook shows hidden elements

You can't 100% rely on anything that's in the HTML keeping its styles when an email is forwarded.  The act of forwarding, unless the original email is attached as a separate .EML/.MSG file, completely changes the overall HTML.

 

You can, however, get better results by commenting out the unwanted content, as opposed to trying to hide it. This requires that you use 2 different booleans, one with the content <!-- and the other with -->.

Yavor_Todorov
Level 3

Re: Forward an email in Outlook shows hidden elements

Hi Sanford,

 

thanks for the reply! 

 

Do you have any details on how to implement the 2 booleans <!--   --> logic? Could you please provide an example?

 

Thanks and best regards,

Yavor

 

Dave_Roberts
Level 10

Re: Forward an email in Outlook shows hidden elements

You might also look into creating different modules that'd let you add/remove modules from a layout rather than show/hide elements inside a "section".  You can get pretty granular with modules and always build 'redundant' modules that have more or less parts to work around using display toggles but this can make for a lot of modules pretty quickly if it's something you use often. 

If you're working in a 1-column layout, you might think about breaking out the different elements of each section into their own module and then stacking those to create a different layout. This might look like a headline (h1) module, a paragraph module, a button module, an image module and so on... This would allow you to add/remove modules from a layout but it doesn't work with a 2-column layout - that's where you'd have to create the redundant modules with/without the add'l bits.