C#hotmail自动接收邮件
生活随笔
收集整理的這篇文章主要介紹了
C#hotmail自动接收邮件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
寫了一個小工具,自動統計郵箱中的一些郵件。
1.?首先要使用OpenPop.Pop3這個dll,可以下載源碼和dll文件:(找不到原來的網址了?上傳后把鏈接更新一下)
2.?引入項目后測試一下就行了
static void Main(string[] args){Pop3Client pop3Client = new Pop3Client();//pop3Client.Connect("pop3.live.com", 995, true);//pop3Client.Authenticate("user", "password");pop3Client.Connect("pop3.live.com", 995, true);pop3Client.Authenticate("****@hotmail.com", "password");// OpenPop.Pop3.AuthenticationMethod.UsernameAndPassword);Message message = pop3Client.GetMessage(1);//Message message = pop3Client.GetMessage(10);string messageText = message.ToMailMessage().Body;}
總結
以上是生活随笔為你收集整理的C#hotmail自动接收邮件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 巴西A320客机坠毁
- 下一篇: Android常用的工具资料