Solved

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

Posted on 2013-11-15
2
291 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

776 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