求助乱码问题!(asp.net)
用jmail在日文操作系统下发邮件(内容为日文),在中文操作系统下收到的邮件乱码(是用xx@163.com 邮箱收的)代码如下:
string mailServer = System.Configuration.ConfigurationSettings.AppSettings["mailServer"];
string sender = System.Configuration.ConfigurationSettings.AppSettings["serviceMail"];
string mailServerUserName = System.Configuration.ConfigurationSettings.AppSettings["mailServerUserName"];
string mailServerPassword = System.Configuration.ConfigurationSettings.AppSettings["mailServerPassword"];
string[] aryRecipient = Recipient.Split(new char[]{';'});
jmail.MessageClass mail = new jmail.MessageClass();
mail.Silent = true;
//mail.Charset = "shift_jis";
mail.Charset = "utf8";
mail.ISOEncodeHeaders = true;
mail.ContentType = "text/html";
mail.Priority = 3;
mail.Subject =Subject;
mail.Body = Content;
mail.From = sender;
mail.MailServerUserName = mailServerUserName;
mail.MailServerPassWord = mailServerPassword;
用什么方法可以把标题编码强制转换,在此谢谢个位高手,帮我解决一下.急啊!!!! --------------------编程问答-------------------- 编码强制转换是可以实现的,但不知道你要转成什么格式的,提供你一个文章,希望对你有帮助
http://blog.csdn.net/octverve/archive/2007/10/02/1809865.aspx
补充:.NET技术 , ASP.NET