locked
Conditional formatting in email signature sent from Outlook RRS feed

  • Question

  • I've run into the well-known issue with Outlook butchering my HTML due to the Word HTML engine.  I'd like to work around it using the conditional tags of [if mso] etc, but the problem is that if I'm creating the email with the signature in Outlook itself, the conditional tags are all getting evaluated such that my signature of 

    <--[if mso]>

    Some HTML for Outlook only

    <[endif]-->

    or conversely 

    <--[if !mso]>

    Some HTML for everyone but Outlook

    <[endif]-->

    are not making it into the signature that is being sent.  The signature being transmitted has no conditional tags and is being evaluated as if mso == true with the appropriate if mso HTML being inserted.  

    My primary issue is the sizing of fonts and an image when the signature is sent from Outlook.  Same HTML injected into OWA in Office365 renders fine on iPhone but from Outlook Desktop it is too big due to hard coding of sizes of images by Outlook's HTML engine.  I am now trying to work around it using the conditional formatting, but am stuck here as well.   Any solutions to either issue would be a great help. 

    Thanks,

    Patrick


    Patrick

    Monday, November 26, 2018 8:31 PM

All replies

  • Hi Patrick,

    Do you mean the HTML email was not rendering correctly in Sent Items folder on your side or in the received message on recipient side? Is the sent mail rendering correctly if we check it from within the webmail?

    As you already know, in newer versions of Outlook, it uses Word or Word based HTML rendering instead of IE. As a result, some portion of the HTML codes may not render correctly. The recommended workaround currently is to use webmail instead of Outlook when sending/receiving such emails. Here is an article discussed this issue in details, just for your reference:

    Outlook 2007/2010/2013/2016 and Word HTML

    (Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information. )

    Regards,
    Steve Fan


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    • Proposed as answer by Steve Fan Friday, November 30, 2018 11:45 AM
    Tuesday, November 27, 2018 9:21 AM
  • Just wanted to say hi and check if there is anything that I can do for you on this problem. If so, please do not hesitate to let me know and I will be happy to help.

    Best regards,
    Steve Fan 


    Please remember to mark the replies as answers if they helped. If you have feedback for TechNet Subscriber Support, contact tnsf@microsoft.com.


    Click here to learn more. Visit the dedicated forum to share, explore and talk to experts about Microsoft Teams.

    Friday, November 30, 2018 11:45 AM
  • The conditional HTML is getting evaluated when the signature is inserted into a new message in Outlook.  What I need to be able to do is from Outlook, create conditional HTML that will get sent.  However, all conditional statements in my .htm signature file are evaluated the minute I open a new email to compose and the signature is added.  I need to be able to send conditional html from Outlook 2016 or have Outlook 2016 not insert width and height fields on my img tag.  Web mail is no issue as my html without a width or a height in the img tag can be properly scaled by iOS mail, but when the image has hardcoded dimensions, iOS doesn't scale it and the result is a signature image that is way too big for mobile.  

    Patrick


    Thursday, December 6, 2018 3:23 PM