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   是什么意思

解决方案 »

  1.   

    我记得有几位仁兄说过类似的使用,关于jmail的用法
      

  2.   

    像蓝色血狐的说法,改成这样
    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();点击后提示网页有错误,页面还是那个页面的哦