- publicvoidRemail()
- {
- //n=第几封信
- jmail.MessageMsg=newjmail.Message();
- jmail.POP3jpop=newjmail.POP3();
- try
- {
- jpop.Connect("gl77","8562","pop3.163.com",110);
- Count.Text=jpop.Count.ToString();
- Msg=jpop.Messages[n];
- Sendform.Text=Msg.FromName;
- Subject.Text=Msg.Subject;
- Datetime.Text=Msg.Date.ToString();
- Body.Text=Msg.Body;
- num.Text=Msg.Attachments.Count.ToString();
- for(inti=0;i<Msg.Attachments.Count;i++)
- {
- f=f+Msg.Attachments[i].SaveToFile("c://"+Msg.Attachments[n].Name);
- }
- name.Text=f;
- jpop.Disconnect();
- }
- catch(Exceptionex)
- {
- Count.Text=ex.Message.ToString();
- }
- }