[英]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.dll
, Google.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.