Search code examples
htmlemailresponsive-designoutlookhotmail

Responsive mail not working in Outlook(hotmail)


I have been using this free responsive email template. I have mainly been using the same .html, except from some small changes her and there regarding text and images. The email displays correctly in browsers like chrome and firefox and in Gmail, but not in Outlook! How can I make the images display in line also for Outlook?

UPDATE: If someone has a suggestion for another responsive email template that also will work in outlook I would appreciate it!


Solution

  • Outlook uses Word as an email editor. You can find the supported and unsupported HTML elements, attributes, and cascading style sheets properties in the following series of articles in MSDN:

    You can a reference to an external images, also you can embedd an image. To get this done, you need to attach it as a file. Set the PR_ATTACH_CONTENT_ID property (DASL - "http://schemas.microsoft.com/mapi/proptag/0x3712001E") using the Attachment.PropertyAccessor.SetProperty method. The value should match the cid attribute of the image. See Outlook 2010- Create a message from an HTM file for more information.

     newMail.HTMLBody = String.Format(
     "<body><img src=\"cid:{0}\"></body>"
    , contentIdValue
    );