发送长主题时以编码格式显示主题
我正在使用 System.Net.Mail 向 Outlook 发送邮件 这里我使用的代码,
msg.From = new MailAddress("[email protected]");
msg.IsBodyHtml = true;
msg.Body = "Some text";
msg.To.Add("[email protected]");
msg.Subject = "[Enterprise Priority] - Customer Incident 85172 for Karthik (108269) [email protected] : Custom function called from within an AND function results in error - Syncfusion Website Team Test I – Created";
我得到的主题像=?utf-8?B?W0VudGVycHJpc2UgU...
我没有在主题中给出任何非ascii字符,但我以编码形式出现。我引用了以下链接,我无法得到解决方案就这么多,
System.Net.Mail和 =?utf-8?B?XXXXX.... 标题
我必须遵循什么才能使主题得到正确的解码形式?
I am sending mail to outlook using System.Net.Mail
Here code i used,
msg.From = new MailAddress("[email protected]");
msg.IsBodyHtml = true;
msg.Body = "Some text";
msg.To.Add("[email protected]");
msg.Subject = "[Enterprise Priority] - Customer Incident 85172 for Karthik (108269) [email protected] : Custom function called from within an AND function results in error - Syncfusion Website Team Test I – Created";
I am getting the subject like =?utf-8?B?W0VudGVycHJpc2UgU...
I dint give any non ascii character in subject but i comes in encoded form.I refered the following link,i cant get the solution that much,
System.Net.Mail and =?utf-8?B?XXXXX.... Headers
What i have to follow to get the subject come correct decoded form?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须设置UTF8编码。
You have to set UTF8 encoding.