当我使用 SmtpClient 类发送纯文本电子邮件时,传输编码设置为quoted-printable:
Content-Transfer-Encoding: quoted-printable
我怎样才能改变它?
当我使用 SmtpClient 类发送纯文本电子邮件时,传输编码设置为quoted-printable:
Content-Transfer-Encoding: quoted-printable
我怎样才能改变它?
使用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);