日期:2014-05-18  浏览次数:20999 次

Jmail 内容显示问题
最近利用JMAIL做了一个 邮箱接收功能

但是在邮件接收的时候 内容出现了点问题

我刚刚利用刚刚创建的126邮箱是自带的2封邮件接收

设置方面的代码是
  mailMessage.Charset = "gb2312";
  mailMessage.Encoding = "base64";
  mailMessage.ContentType = "text/html";
  mailMessage.ContentTransferEncoding = "base64";
  mailMessage.ISOEncodeHeaders = false;

内容接收的时候 是用的
  sBody = mailMessage.HTMLBody;

出现的HTML 是:
"<table width=\"606\" align=\"center\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" background=\"http://mimg.127.net/xm/mail_res/common/bg.png\" style=\"font-family:verdana;font-size:14px;line-height:180%\">\r\n <tbody>\r\n\t<!-- banner -->\r\n <tr>\r\n \t<td colspan=\"3\" style=\"font-size:0;line-height:0\">\r\n\t\t\t<table width=\"606\" height=\"66\" background=\"http://mimg.127.net/xm/mail_res/common/top.png\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\r\n\t\t\t\t<tr>\r\n\t\t\t\t\t<td width=\"40\">&nbsp;</td>\r\n\t\t\t\t\t<td height=\"61\" valign=\"top\">\r\n\t\t\t\t\t\t<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" height=\"61\">\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td height=\"25\">&nbsp;</td>\r\n\t\t\t\t\t\t\t\t<td>&nbsp;</td>\r\n\t\t\t\t\t\t\t\t<td>&nbsp;</td>\r\n\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t<td valign=\"top\" width=\"106\"><a href=\"http://mail.163.com/\" target=\"_blank\"><img src=\"http://mimg.127.net/logo/163logo-s.gif\" alt=\"163网易免费?? border=\"0\"/></a></td>\r\n\t\t\t\t\t\t\t\t<td valign=\"top\" width=\"106\"><a href=\"http://www.126.com/\" target=\"_blank\"><img src=\"http://mimg.127.net/logo/126logo-s.gif\" alt=\"126网易免费?? border=\"0\"/></a></td>...................


问题很明显 在出现汉字的这些地方出现了错误 !

应该显示的内容 应该是alt=\"163网易免费邮\" border=\"0\"/>

有能看出问题来的大大么? 
求指教!

------解决方案--------------------
新问题:
oPopMail.Messages[i].Headers.GetHeader("Subject")

获取的格式类似于 =?utf-8?B?5oiR5b6X57uZ5oiR?=

5oiR5b6X57uZ5oiR是标题 经过base64编码后可转译

我的问题是 有时候取出的"5oiR5b6X57uZ5oiR" 未编码的标题 取不全..

有的就会取全......