How to make the html visible to email clients?
-
I am working on a tool that generats html code and sends it to any given email(s). The problem is when the html is sent, it just shows the source code in the email instead of the actual html visuals, formatting, etc. How can I make email clients display the html properly? i.e. is there some kind of property to add to the html code that will show it in emails, like
<META http-equiv=Content-Type content="text/html; charset=unicode" ShowInEmail="true">
-
I am working on a tool that generats html code and sends it to any given email(s). The problem is when the html is sent, it just shows the source code in the email instead of the actual html visuals, formatting, etc. How can I make email clients display the html properly? i.e. is there some kind of property to add to the html code that will show it in emails, like
<META http-equiv=Content-Type content="text/html; charset=unicode" ShowInEmail="true">
You can't do anything except have your users specify if they use a mail program that shows HTML, or if they want plain text.
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
-
I am working on a tool that generats html code and sends it to any given email(s). The problem is when the html is sent, it just shows the source code in the email instead of the actual html visuals, formatting, etc. How can I make email clients display the html properly? i.e. is there some kind of property to add to the html code that will show it in emails, like
<META http-equiv=Content-Type content="text/html; charset=unicode" ShowInEmail="true">
-
It depends how your sending it. With the standard
System.Net.Mail.SmtpClient
you can send aSystem.Net.Mail.MailMessage
setting its properties and settingIsBodyHtml
to true.Using the wrong tool for the job is half the fun.