1

当我使用 SmtpClient 类发送纯文本电子邮件时,传输编码设置为quoted-printable:

Content-Transfer-Encoding: quoted-printable

我怎样才能改变它?

4

1 回答 1

3

使用AlternateView撰写消息:

 MailMessage message = new MailMessage("from@example.com", "to@example.com");
 message.Subject = "Test";
 AlternateView plainText = AlternateView.CreateAlternateViewFromString("test");
 plainText.TransferEncoding = System.Net.Mime.TransferEncoding.SevenBit;
 message.AlternateViews.Add(plainText);
 message.IsBodyHtml = false;

 SmtpClient smtp = new SmtpClient();
 smtp.Send(message);
于 2012-05-29T23:53:41.720 回答