private void Button2_Click(object sender, System.EventArgs e)
{
jmail.POP3Class pm=new jmail.POP3Class();
pm.Connect("hclong406","198302100271","pop3.163.com",110);
pm.Logging = true;
pm.DownloadMessages();
jmail.MessagesClass msgs = (jmail.MessagesClass)pm.Messages;
for(int i=1;i<msgs.Count;i++)
{
//你的信件内容可以这样获得;
this.TextBox1.Text = msgs[i].From;
this.TextBox2.Text = msgs[i].Subject;
this.TextBox3.Text = msgs[i].RecipientsString;
this.TextBox4.Text = msgs[i].Body;//
jmail.AttachmentsClass att = (jmail.AttachmentsClass)msgs[i].Attachments;
for(int j=0;j<att.Count;j++)//附件接收
att[j].SaveToFile("c:\\"+att[j].Name);
}
pm.Disconnect();
在pm.DownloadMessages(); 处提示POP3: -ERR Can't get the letter 1tbiDAGNeT+c1udj4AAAso[12], try again later 是什么意思
{
jmail.POP3Class pm=new jmail.POP3Class();
pm.Connect("hclong406","198302100271","pop3.163.com",110);
pm.Logging = true;
pm.DownloadMessages();
jmail.MessagesClass msgs = (jmail.MessagesClass)pm.Messages;
for(int i=1;i<msgs.Count;i++)
{
//你的信件内容可以这样获得;
this.TextBox1.Text = msgs[i].From;
this.TextBox2.Text = msgs[i].Subject;
this.TextBox3.Text = msgs[i].RecipientsString;
this.TextBox4.Text = msgs[i].Body;//
jmail.AttachmentsClass att = (jmail.AttachmentsClass)msgs[i].Attachments;
for(int j=0;j<att.Count;j++)//附件接收
att[j].SaveToFile("c:\\"+att[j].Name);
}
pm.Disconnect();
在pm.DownloadMessages(); 处提示POP3: -ERR Can't get the letter 1tbiDAGNeT+c1udj4AAAso[12], try again later 是什么意思
解决方案 »
- 使用Adapter.Update大批量插入数据的问题
- 如何用正则表达式,防止用户输入不正确的文件名?
- C# DataGrideView排序取状态问题
- 关于限制输入的问题
- 在VS.net 2003中制作过MSI安装包的问题
- 有自动增长列的表如何用dataAdaper的update()方法修改数据?
- 内容过滤问题
- 我这个怎么回事儿啊?????
- 当dataGrid中没有对应数据显示时,如何向ListView一样显示带有Grid的空行?
- 在控件中使用DataGrid的UpdateCommand,CancelCommand事件
- 如何把一个字符串按句号分割开来?
- 我把从richtextbox 中取得的汉字字符写到htm 文件中,,怎么是乱码??
private void Button2_Click(object sender, System.EventArgs e)
{
jmail.POP3Class pm=new jmail.POP3Class();
pm.Connect("hclong406","198302100271","pop3.163.com",110);
pm.Logging = true;
try
{
pm.DownloadMessages();
jmail.MessagesClass msgs = (jmail.MessagesClass)pm.Messages;
for(int i=1;i<msgs.Count;i++)
{
//你的信件内容可以这样获得;
this.TextBox1.Text = msgs[i].From;
this.TextBox2.Text = msgs[i].Subject;
this.TextBox3.Text = msgs[i].RecipientsString;
this.TextBox4.Text = msgs[i].Body;//
jmail.AttachmentsClass att = (jmail.AttachmentsClass)msgs[i].Attachments;
for(int j=0;j<att.Count;j++)//附件接收
att[j].SaveToFile("c:\\"+att[j].Name);
}
}
catch(Exception err)
{
Response.Write("<script language='JavaScript'>window.alert('"+err.Message+"');</script>");
}
pm.Disconnect();点击后提示网页有错误,页面还是那个页面的哦