我的接收代码如下:Jmail.POP3 mypop3=new Jmail.POP3Class();
connectpop3(mypop3,"****@rgis.com.cn","******","mail.rgis.com.cn");
Jmail.MessageClass mymail=new Jmail.MessageClass();
mymail=(Jmail.MessageClass) mypop3.Messages[num];//num为上个页面传过来的
mymail.ContentType="text/html";
mymail.ContentTransferEncoding="Quoted-Printable";
mymail.Encoding="uuencode";
mymail.Encoding="quoted-printable";
mymail.Charset="gb2312";

Response.Write(mymail.Subject+"<br>");
Response.Write(mymail.From+"<br>");
Response.Write(mymail.Body+"<br>");
Response.Write("<font color='red'>附件数:</font>"+mymail.Attachments.Count.ToString()+"<br>");
string AttName="";
int stt;
for(int i=0;i<mymail.Attachments.Count;i++)
{
Jmail.AttachmentClass att=(Jmail.AttachmentClass) mymail.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>");
}private void connectpop3(Jmail.POP3 mypop3,string username,string password,string emailserver)
{
try
{
mypop3.Logging=true;
mypop3.Connect(username,password,emailserver,110);

}
catch 
{
Server.Transfer("error.htm");
}
}

解决方案 »

  1.   

    http://community.csdn.net/Expert/topic/3379/3379845.xml?temp=.4405176
      

  2.   

    和我遇到的一样..加附件的时候,会出现乱码..看这个.我已经搞定了...
    http://www.cnblogs.com/matrix/archive/2004/05/20/10495.aspx
      

  3.   

    还有.最好不要用Jmail4.2pro
    最好w3JMail43P.exe用这个人版.
    有的时候Jmail4.2pro会出问题...比如收附件的时候..
      

  4.   

    是不是用的base64编码 ,是的话解码就是了
      

  5.   

    楼上的,我用base64、uncoded和quoted-printable三种编码方式解码,都不行
      

  6.   

    最后还是自己搞定,原来是4.2与我那系统有冲突,换了4.4就ok了,什么都不用改
    那么这100分如何分配呢,很愿意分给我自己,好像不可以
    那就见者有分吧,欢迎后来者,up有分
      

  7.   

    加mymail.Encoding="base64"就行了
    关于Jmail的其他用法,csdn里有很多,各位自己找了
    或者用我上面贴出来的也行