开发者

text/plain and text/html with c++ mail

开发者 https://www.devze.com 2023-03-09 09:08 出处:网络
I am 开发者_运维百科using System::Net::Mail to send emails. I was questioned about is it able to send two versions of email:

I am 开发者_运维百科using System::Net::Mail to send emails. I was questioned about is it able to send two versions of email:

1) the html version of email for clients that can read html emails

2) text/plain for people who can't read html emails, and also the html version will be attached

is this possible using System::Net::Mail? I know how to enable HTML body version, but, how to send to types of message?

Thanks!


To let the recipient decide which version she wants to read, the mail needs to be composed using the multipart/alternative MIME type. System.Net.Mail supports this by means of the System.Net.Mail.MailMessage.AlternateViews collection.

0

精彩评论

暂无评论...
验证码 换一张
取 消