hotmail收邮件-源码联系我~

业余之作

源码很简单 ,实现了收邮件,读邮件,删邮件






        static void Main()

        {

            HotMailPop3 pop3 = new HotMailPop3();

            pop3.decoder = Encoding.Default.GetDecoder();

            if (pop3.LoginMailServer())

            {

                pop3.StreamGetMailList();

                string a = Console.ReadLine();

                Console.WriteLine("邮件" + a + "的内容!");

                StreamWriter sm_2 = new StreamWriter("2.txt");

                sm_2.WriteLine(pop3.StreamGetMailIndex(int.Parse(a)));

                sm_2.Close();

            }

            if (pop3.LoginMailServer())

            {

                //  pop3.StreamDelMailIndex(2);

            }

            StreamWriter sm = new StreamWriter("1.txt");

            foreach (var item in pop3.GetMailList)

            {

                sm.WriteLine("分割线________________________________");

                sm.WriteLine(item.Value);

            }

            sm.Close();

            pop3.OutMailServer();

        }

posted @ 2011-06-16 23:02  MokLiu  阅读(415)  评论(0编辑  收藏  举报