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

后端 未结 6 1301
暖寄归人
暖寄归人 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:25

    What you want to do is use the AlternateViews property on the MailMessage

    http://msdn.microsoft.com/en-us/library/system.net.mail.mailmessage.alternateviews.aspx

提交回复
热议问题