我一运行老报:This function is not included in this version of jmail.的错误,这是怎么了,我把防火墙和杀毒软件关了也不行,是不是我的代码有问题,大家看看问题出在那里!
jmail.POP3 mypop3 = new jmail.POP3Class();
try
{
mypop3.Connect("[email protected]","5678","pop3.163.com",110);
}
catch(Exception ex)
{
string str = "";
str = ex.Message.ToString();
Response.Write(str);
Response.End();
}
mypop3.Logging=true;
int stt,mailNum=1;
jmail.MessageClass Mail=new MessageClass();
for(;mailNum<mypop3.Messages.Count;mailNum++)
{
Mail=(MessageClass)mypop3.Messages[mailNum];
Mail.ContentTransferEncoding="base64";
Mail.Encoding="base64";
Mail.Charset="GB2312";
Response.Write(Mail.Subject+"<br>");
Response.Write("<font color='red'>发信人:</font>"+Mail.FromName+"<br><font color='red'>发信地址:</font>"+Mail.From+"<br>");
Response.Write("<font color='red'>邮件内容:</font><br>"+Mail.Body+"<br><br><br>");
Response.Write("<font color='red'>附件数:</font>"+Mail.Attachments.Count.ToString()+"<br>");
string AttName="";
for(int i=0;i<Mail.Attachments.Count;i++)
{
jmail.Attachment att=Mail.Attachments[i];
AttName=att.Name;
if((stt=AttName.IndexOf("\""))!=-1)
{AttName=AttName.Substring(0,stt);}
if(File.Exists(Server.MapPath(".//Attachment//")+AttName)){File.Delete(Server.MapPath(".//Attachment//")+AttName);}
att.SaveToFile(Server.MapPath(".\\Attachment\\")+AttName);
Response.Write("<a href='"+Server.MapPath(".//Attachment//")+AttName+"'>"+AttName+"</a><br>");

}
}