如何接收并读取邮件中的内容 下面是一个pop3接收类的一个方法。http://www.codeproject.com/csharp/pop3client.asp 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 OpenPOP.NET(http://sourceforge.net/projects/hpop) 下面把所有邮件显示并显示附件并提供附件下载myJmail.POP3Class mypop3;mypop3.Connect("*****@***.**","*******","*******",110);mypop3.Logging=true;int stt,mailNum=1; myJmail.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++) { myJmail.Attachment att=Mail.Attachments[i]; AttName=att.Name; ((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>"); }} 帮忙给看个问题 image数据类型的字段,在报表中如何让它正常显示出来................. 关于datagrid按钮列的问题 有点麻烦的问题 解决方案和项目重命名,名称空间没有随之变化 .NET环境下自动内存管理概念的一些疑问 请问各位,.net开发用哪种报表好? 如何能实现在DATAGRID…… 请问如何判断EXCLE某单元格的字体颜色 怎么防止Treeview自动选中第一个节点? 如何接收邮件,和读里面的内容 ADO.NET中如何實現像Delphi中一樣強大的计算字段和查詢字段
mypop3.Connect("*****@***.**","*******","*******",110);
mypop3.Logging=true;
int stt,mailNum=1;
myJmail.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++)
{
myJmail.Attachment att=Mail.Attachments[i];
AttName=att.Name;
((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>");
}
}