Solved

Why do I lose mobile responsiveness when putting html into .net mail message body

Posted on 2013-11-15
2
284 Views
Last Modified: 2013-11-21
I have a html file that I use a streamreader  to read and then use that html code in the body of the .net email.   What happens is though if I few on my iphone the format is all messed up, but if I send as attachment and open it, the format is perfect and stays perfect even if I move the phone on its side.  So something seems to get changed when its part of the body.  Same html,  any ideas.  I didn't  send the code because like I said if I take the streamreader and use a streamwriter on the file, and send the file it looks great, but use streamreader and save to string, and assign to mail body and its all misformatted.


thanks
0
Comment
Question by:mgmhicks
2 Comments
 
LVL 23

Accepted Solution

by:
Ioannis Paraskevopoulos earned 500 total points
Comment Utility
How do you make your html responsive? I guess you use a library like bootstrap. When you send it as an attachment, then the browser will open the attachment and will honour all the css and javascript rules. Now, if you have it on the body, then the email client will open it. This is totally different than the browser. In most cases you may not have css reference, js reference, inline css is limitted, and all these limitations differ from client to client.

Read through this article
http://litmus.com/help/email-clients/rendering-engines/

I still remember finding a table with what features are allowed in the most popular email clients, but i don't remember the link.

Bottom line, an email client is not a web client and will be picky in what will render. Even if you get nice results with your favorite one, chances sre that you will find differences with the others.

Giannis
0
 

Author Closing Comment

by:mgmhicks
Comment Utility
Good Article
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now