我的接收代码如下: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");
}
}
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");
}
}
http://www.cnblogs.com/matrix/archive/2004/05/20/10495.aspx
最好w3JMail43P.exe用这个人版.
有的时候Jmail4.2pro会出问题...比如收附件的时候..
那么这100分如何分配呢,很愿意分给我自己,好像不可以
那就见者有分吧,欢迎后来者,up有分
关于Jmail的其他用法,csdn里有很多,各位自己找了
或者用我上面贴出来的也行