【问题标题】:c# library that extracts gmail,yahoomail and AOL contacts [closed]提取 gmail、yahoomail 和 AOL 联系人的 c# 库
【发布时间】:2010-06-09 03:47:01
【问题描述】:

有没有什么好的 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# 库....

【问题讨论】:

    标签: c# import email contacts


    【解决方案1】:

    我还没有看到一个适合所有这些的好方法。单独使用各个服务相当容易,因为所有这些服务都有 .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

    【讨论】:

      【解决方案2】:
      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);
         }
       }
      

      【讨论】:

        【解决方案3】:

        您应该使用 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'/>");
                }
            }
          }
        }` 
        

        【讨论】:

          【解决方案4】:

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

          【讨论】:

            【解决方案5】:

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

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

            【讨论】:

              猜你喜欢
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              • 2018-01-01
              • 2016-06-20
              • 2023-04-10
              • 1970-01-01
              • 1970-01-01
              • 1970-01-01
              相关资源
              最近更新 更多