C# .NET - Get contact list from gmail or yahoo or rediffmail

Asked By aashish sharma on 19-May-09 04:19 AM
Hi
 
I want to get all contact list of email from gmail , yahoo or rediffmail or any other in the asp.net c# how we do it Please send me full code of this i need urgent ..

thanks

Re - Ravenet Rasaiyah replied to aashish sharma on 19-May-09 04:31 AM

Hi

Here open source library to import contact from the gmail,yao and etc..

http://sourceforge.net/projects/opencontactsnet/

thank you
Santhosh N replied to aashish sharma on 19-May-09 04:37 AM

For this you will be having service APIs for .Net framerowrk...

The code to get Gmail contacts goes this way...

ContactsQuery query = new ContactsQuery(ContactsQuery.CreateContactsUri("default"));

ContactsFeed feed = service.Query(query);

foreach (ContactEntry entry in feed.Entries)
{
  Console.WriteLine(entry.Title.Text);
  foreach (EMail email in entry.Emails)
  {
    Console.WriteLine("\t" + email.Address);
  }
}

Check here for full details on how to use the API:

http://code.google.com/apis/contacts/docs/2.0/developers_guide_dotnet.html

and

http://www.codeproject.com/KB/cs/gmailagent.aspx

TO get yahoo contact list, check this code snippet..

http://admeline.com/Default.aspx?module=Article&item=75

hi - aashish sharma replied to Ravenet Rasaiyah on 19-May-09 04:38 AM

Hi
cool but how i implement in asp.net and which one library will be used in application Please let me know
hi - Ravenet Rasaiyah replied to aashish sharma on 19-May-09 04:42 AM
Hi

This is class library , you can add within your web project as reference then you can call teh classed with your web application.

Here Code for use


private void GetAllEmailContactMine()
{
MailContactList list = null;

GmailExtract extractor = new GmailExtract();
bool res = extractor.Extract( new NetworkCredential( "test@ggmail.com", "Password" ), out list );

if ( list != null )
{
Console.WriteLine( "{0} items imported", list.Count );
foreach ( MailContact contact in list )
{
// here you can name and email
}
}

}

thank you
try using this Contact Reader library mentioned - H K replied to aashish sharma on 19-May-09 02:34 PM
Contacts Reader is a library written to retrieve  the contact lists directly from an email  websites using user's credentials. It is developed by C#.NET 2.0. Supports 5  clients including Yahoo, Hotmail, Gmail, AOLmail and Rediffmail.

You can find the source code of this library in the below link
http://www.ideabubbling.com/ContactsReader.aspx

Hi - aashish sharma replied to H K on 20-May-09 12:58 AM
hi

its good thing but it is not working with gmail and rediffmail..

wht i do
hello - robin robin replied to H K on 10-Jul-09 02:45 AM
I am unable to open http://www.ideabubbling.com/ContactsReader.aspx. Can you please help how to get hotmail and AOL contacts in my .net application. pls help with code.
Query for OpenContactsNet-1.0 - mary Strauss replied to Ravenet Rasaiyah on 29-Aug-09 03:45 AM
if we use LiveContact class it not returnin the result list value is false in case of LiveContacts
Le replied to mary Strauss on 21-Jun-10 08:06 AM
I think every contact except yahoo contact's easy to make in .net
I face some problem get yahoo contact from mail in C#
And I think an this is good option for you (I tried and quite ok) http://www.lamdaica.com/demo/seeDemo.aspx?id=4&lang=1
how to import AOL contact(APL or anyother way) in c# .net - chamara replied to aashish sharma on 19-Jul-11 03:52 AM

I read the following AOL link and try to implement as describe in the article. http://dev.aol.com/article/2007/integrating_openauth_into_aspnet

I was successful and but not enough for my requirement .

but the my requirement is import AOL contact list to my web site for particular AOL user. It seems to me hardly any help from internet and I wasted more time to find the API and related .net C# for this issue. Pls be kind enough to send me solution and it very argent requirement and I am running out of time above issue.