问题描述
组件下载(不包含原文件):<Ahref="http://download.csdn.net/source/496787">http://download.csdn.net/source/496787</A>使用方法如下:1、创建一个EmailContacts类usingSystem;usingSystem.Collections.Generic;usingSystem.Net;usingSystem.Text;usingOpenContactsNet;///<summary>///包含获取email联系人的方法///</summary>publicclassEmailContacts{///<summary>///获取email联系人列表///</summary>///<paramname="username">email地址</param>///<paramname="password">密码</param>///<returns></returns>publicMailContactListGetContacts(stringusername,stringpassword){if(username.Split('@').Length!=2)returnnull;MailContactListlist=null;NetworkCredentialcredential=newNetworkCredential(username,password);switch(username.Split('@')[1].ToLower()){case"gmail.com":GmailExtractgmail=newGmailExtract();gmail.Extract(credential,outlist);break;case"yahoo.com":YahooExtractyahoo=newYahooExtract();yahoo.Extract(credential,outlist);break;case"live.com":case"hotmail.com":LiveExtractlive=newLiveExtract();live.Extract(credential,outlist);break;default:break;}returnlist;}}组件下载(不包含原文件):http://download.csdn.net/source/496787使用方法如下:1、创建一个EmailContacts类usingSystem;usingSystem.Collections.Generic;usingSystem.Net;usingSystem.Text;usingOpenContactsNet;///<summary>///包含获取email联系人的方法///</summary>publicclassEmailContacts{///<summary>///获取email联系人列表///</summary>///<paramname="username">email地址</param>///<paramname="password">密码</param>///<returns></returns>publicMailContactListGetContacts(stringusername,stringpassword){if(username.Split('@').Length!=2)returnnull;MailContactListlist=null;NetworkCredentialcredential=newNetworkCredential(username,password);switch(username.Split('@')[1].ToLower()){case"gmail.com":GmailExtractgmail=newGmailExtract();gmail.Extract(credential,outlist);break;case"yahoo.com":YahooExtractyahoo=newYahooExtract();yahoo.Extract(credential,outlist);break;case"live.com":case"hotmail.com":LiveExtractlive=newLiveExtract();live.Extract(credential,outlist);break;default:break;}returnlist;}}viewplaincopytoclipboardprint?2、新建webform:getcontacts.aspxgetcontacts.aspx.csusingOpenContactsNet;voidPage_Load(objectsender,EventArgsargs){EmailContactscontacts=newEmailContacts();MailContactListmails=contacts.GetContacts("username@service.com","password");foreach(MailContactmailinmails){Response.Write("Name:"+mail.Name);Response.Write("Email:"+mail.Email);}}转自:http://blog.csdn.net/sq_zhuyi/archive/2008/06/14/2546915.aspx
解决方案
解决方案二:
楼主好人!
解决方案三:
引用1楼csShooter的回复:
楼主好人!
解决方案四:
-----好人楼主-----
解决方案五:
能申精不,哈哈
解决方案六:
顶个
解决方案七:
顶一下,接个分
解决方案八:
留名。。备查备用,顺便接点分过节。。谢谢!
解决方案九:
楼主好人!
解决方案十:
UsingSystem.Web.UI
解决方案十一:
没有qq、126、163、msn、sina的邮箱啊
解决方案十二:
http://topic.csdn.net/u/20120723/09/4a196e0d-5244-4e88-b863-cdd35a862a30.html我这里有。