简体   繁体   English

如何使用 C#.net 从 gmail 或 yahoo 或 rediffmail 获取联系人列表

[英]How can i get contact list from gmail or yahoo or rediffmail using C#.net

I am developing a web application using C#.net and Asp.net.我正在使用C#.net 和 Asp.net 开发 web 应用程序。

There is an option to Bulk invitation to friends.可以选择批量邀请朋友。

For This, Logined user can import their Contacts from their email accounts (like为此,登录用户可以从他们的 email 帐户中导入他们的联系人(如

Gmail , Gmail ,

YahooMail ,雅虎邮箱

Rediffmail ,重发邮件

Hotmail ,热邮件

AOL ,美国在线

Microsoft Outlook Express ,微软 Outlook 快递

Sify etc...) Using my Application. Sify等...)使用我的应用程序。

How can i do it?我该怎么做?

From Gmail you can query the contacts using the .Net library for the Google Data Protocol从 Gmail 您可以使用Google 数据协议的 .Net 库查询联系人

You should look especially at the Google.Contacts namespace, which is targeting the Google Contacts Data API ( link ).您应该特别查看Google.Contacts命名空间,它以Google Contacts Data API链接)为目标。

From Yahoo you can use the Yahoo Contacts API .您可以从 Yahoo 使用Yahoo Contacts API Yahoo APIs use the Yahoo Query Language ( YQL ). Yahoo API 使用Yahoo Query Language ( YQL )。

I have never used it myself, but a google search came up with http://openinviter.com/ which seems like an open protocol to import contacts from various many providers.我自己从未使用过它,但谷歌搜索提出了http://openinviter.com/这似乎是一个从许多提供商导入联系人的开放协议。

try using with Google.GData.Contacts.dll , Google.GData.Apps.dll尝试与Google.GData.Contacts.dllGoogle.GData.Apps.dll使用

username=your emailid;
password=email password;
app_name="MyNetwork Web Application!";
DataSet ds = GmailContacts.GetGmailContacts(App_Name, username, password);
GridView1.DataSource = ds;
GridView1.DataBind();  

You can use opencontactsNet.dll to fetch contacts.您可以使用 opencontactsNet.dll 来获取联系人。

using OpenContactsNet;
OpenContactsNet.GmailExtract gm = new OpenContactsNet.GmailExtract();
NetworkCredential nw = new NetworkCredential("sainathsagars@yahoo.com", "");
OpenContactsNet.MailContactList ml = new OpenContactsNet.MailContactList();
gm.Extract(nw, out ml);
// Trying to show something
StringBuilder sbMessage = new StringBuilder();
string strcount = (ml.Count + " Contacts : ");
foreach (MailContact mc in ml)
{
    sbMessage.Append(mc.Email + "<hr size='1'/>");
}

Previously I had such task and I solved it by using this awesome lib openinviter .以前我有这样的任务,我通过使用这个很棒的 lib openinviter解决了它。 It's developed on php, to use it from C# I wrote simple php REST service.它是在 php 上开发的,从 C# 开始使用它,我编写了简单的 php Z50780F47F65839D43FZ60BC 服务。 Hope it will help you.希望它会帮助你。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用Oauth在mvc C#中从Gmail导入联系人列表? - How can I Import Contact list from Gmail in mvc C# using Oauth? 如何使用C#.net从gmail下载日历? - How to download calendar from gmail using c#.net? GeoCode在C#.NET中使用Yahoo API - GeoCode using Yahoo API in C#.NET 如何使用 c#.net 从 combobox 中的 sql 服务器获取所有数据库的列表 - How to get list of all database from sql server in a combobox using c#.net C#.NET - 如何使用typeof()来继承? - C#.NET - How can I get typeof() to work with inheritance? 如何使用C#.net从数据库获取经度 - How to get lat long from database using c#.net 在Windows应用程序中,如何使用C#.Net 2.0从PictureBox中的网络摄像头保存实时图像 - In windows application how can i save a live image from webcam in picturebox using C#.Net 2.0 如何从 C#.Net 核心中的任何类型的 object 结构(使用递归方法?)获取 JSON 中的属性及其值的平面列表? - How to get flat list of property and its values in JSON from any kind of object structure (using recursive method?) in C#.Net core? 如何使用C#.net中的SharpSVn DLL获取SVN工作文件夹中当前特定文件的先前版本? - How can I get the previous version of a particular file currently in the SVN working folder using SharpSVn DLL in C#.net? C#.NET Web API 2,如何使用 HTTPGET 异步方法上的 HttpContent 从网站中提取特定文本? - C#.NET Web API 2, How can I extract a certain text from a website using the HttpContent on a HTTPGET async method?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM