1

是否有任何好的 c# 库可以提取 gmail、yahoomail 和 AOL 联系人?任何建议...

我查看了Opencontacts.net,并在我的 asp.net Web 应用程序中使用了 opencontacts.dll,但我无法使其工作......它显示错误Could not load file or assembly 'Utilities, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.......

我这样做了,

OpenContactsNet.GmailExtract gm = new OpenContactsNet.GmailExtract();
NetworkCredential nw =new NetworkCredential("chendur.pandiya@gmail.com","***");
OpenContactsNet.MailContactList ml = new OpenContactsNet.MailContactList();
gm.Extract(nw, out ml);

我正在寻找可以满足我需求的任何其他 c# 库....

4

5 回答 5

4

我还没有看到一个很好的适用于所有这些的。单独使用各个服务相当容易,因为所有这些服务都有 .net 示例。我可能会以任何方式单独使用它们,然后可能会提取一个通用接口,以便可以根据需要添加其他流行的网络邮件服务。

雅虎:http: //developer.yahoo.com/addressbook/

邮箱:http ://code.google.com/apis/contacts/docs/1.0/developers_guide_dotnet.html

美国在线:http ://dev.aol.com/article/2007/integrating_openauth_into_aspnet

Hotmail:http: //msdn.microsoft.com/en-us/library/bb463989.aspx

于 2010-06-11T04:29:49.060 回答
1
RequestSettings rs = new RequestSettings(this.ApplicationName, this.userName, this.passWord);
 // AutoPaging results in automatic paging in order to retrieve all contacts
 rs.AutoPaging = true;
 ContactsRequest cr = new ContactsRequest(rs);

 Feed<Contact> f = cr.GetContacts();
 foreach (Contact e in f.Entries)
 {
   Console.WriteLine("\t" + e.Title);
   foreach (EMail email in e.Emails)
   {
      Console.WriteLine("\t" + email.Address);
   }
   foreach (GroupMembership g in e.GroupMembership)
   {
      Console.WriteLine("\t" + g.HRef);
   }
   foreach (IMAddress im in e.IMs)
   {
      Console.WriteLine("\t" + im.Address);
   }
 }
于 2014-02-01T08:36:05.397 回答
0

您应该使用 System.Net 添加;

`using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
/*CREDENTIAL CLASS' NAMESPACE*/
using System.Net;
using OpenContactsNet;

namespace WebApplication1
{
public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        OpenContactsNet.GmailExtract gm = new OpenContactsNet.GmailExtract();
        NetworkCredential nw = new NetworkCredential("tresorunikin@gmail.com", "titinik");
        OpenContactsNet.MailContactList ml = new OpenContactsNet.MailContactList();
        gm.Extract(nw, out ml);
//Triyng to Show somethin
        Response.Write(ml.Count+" Contacts : ");
        foreach(MailContact mc in ml){
            Response.Write(mc.Email+"<hr size='1'/>");
        }
    }
  }
}` 
于 2012-02-08T12:06:33.323 回答
0

缺少的“实用程序”程序集位于 OpenContactsNet 项目下载 (OpenContactsNet\Lib\Utilites.dll) 下的 \Lib 文件夹中。

但是,我认为它不再那么有效了。这个库已经过时了。

于 2012-08-02T02:25:13.583 回答
0

是 .Net 开发者的 Gmail 联系人导入 2.0 的新链接

于 2012-03-09T14:26:26.037 回答