tags:

views:

38

answers:

2

Hello,

I'm using C# to send email newsletters for subscribers. There's no problem with sending the email but some email clients like outlook and hotmail receive html newsletter as an attachment and the email body contains only plaintext with html tags removed and some clients like gmail receive the email just fine.

What actually creates this behavior? If i put just few html tags in to message outlook and hotmail shows the newsletter fine but as i put in more html elements my mail arrives as attachment.

I've been trying to find out how to make my email appear ok in most popular email clients like outlook but have had no success so far. Anyone care to enlighten me how this email + html stuff actually works?

A: 

Have a look at the Mailchimp and CampaignMonitor links in this answer, which may help you.

Ed Harper
A: 

Since you don't provide any information about how you're using C# to send this email, we can only speculate about what you're doing and what the problem might be. It sounds like you might be using MailMessage.AlternateViews to send your HTML, but only have that one view. If you're not intending to send out a multipart/alternative message then you should simply set the MailMessage.Body to your HTML content with MailMessage.IsBodyHtml = true.

That being said: I make the assumptions I do because some email clients are smarter than others, and if the content-type header doesn't make sense they'll do their best to try to figure out what the nicest way to display the content is, each potentially trying something different. If, however, my assumptions are incorrect it would greatly help to know the code you're using to generate the email, and even an example of the message headers.

Guildencrantz