Friday, 3 February 2012

Reading Contacts(Address Book) from Yahoo, Gmail, Rediff, MSN, AOL

When we are developing a scoal networking websites or Some Referal websites, when the user registration completed then we have to provide an interface to invite the registerd user friends. For this purpose we have to provide option to get contcats (AddressBook) from various Email Providers. 





Here I am taking some popular Email Providers like Yahoo, Google, MSN, Rediff, AOL. In order to Read the Address book of Yahoo, Google, Rediff, MSN, AOL we have access the API which provided by them itself.
Few days before I download one one dll from net. Its provided by Ideabubling. It contains all API of Yahoo,Google, Rediff, MSN, AOL, which is ready to use. Here In this application I use the dll. 


The Core Functionality is, when user provides Email Address and Password, If these details are valid then we will call getContact method and these details are stored in DataTable. You can see the sample code here.. 


DataTable dtContatct = new DataTable();

MailType mt = FindTheMailType();

MailClient.GetContacts(mt, strUserid, strPassword, out boolIsOK, out dtContatct, out strError);

dtContatct = MailClient.GetFormat(mt, dtContatct);



Here “mt” is the mail type. It will check what type of Email Address It is. Either Yahoo, Gmail, etc.Then this DataTable is binded with GridView, so that User can able to see his contcats and he can select some of the or all to send a mail. 
You can see the Screen Shot..

Download Complete Application.. Click Here..!

No comments:

Post a Comment