Sending a mail as both HTML and Plain Text in .net

后端 未结 6 1304
暖寄归人
暖寄归人 2020-12-24 05:12

I\'m sending mail from my C# Application, using the SmtpClient. Works great, but I have to decide if I want to send the mail as Plain Text or HTML. I wonder, is there a way

6条回答
  •  不知归路
    2020-12-24 05:50

    For the people(like me) who've had the problem of gmail displaying the plaintext part instead of the html part.

    Gmail seems to always display the last part in your message.

    So if you've added the html part before your plain text part chances are gmail will always show the plain text variant.

    To fix this you can simply add the plain text part before your html part.

提交回复
热议问题