Solved

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

Posted on 2013-11-15
2
294 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
ID: 39654125
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
ID: 39667864
Good Article
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

860 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