Gmail chooses MIME-type “text/plain” over MIME-type “text/html”


When sending out email through .NET, I sometimes use the MailMessage.AlternateViews collection to offer email-clients to choose between an html- and a plain-text-version of the message.

However, recently I found a problem, where – when providing these 2 options for the receiving client – Gmail would always choose the plain-text version, although Gmail most certainly can display html.


It seems, that Gmail will always choose the latter of the 2 options (in this case only? I don’t know), so you should simply add the AlternateView with MIME-type “text/plain” before the “text/html” one.

References (Tim-dude in comment) (Franklin Neves in comment)

Start the conversation