hi friends, i have once asked this question in this forum but i got no help....please any idea how to do it?? any suggestions??
How to fetch contact or address list fetching form any email account using their EmailID and Password programmatically??
I want to fetch from atleast following Mail Providers:
Hotmail
Rediffmail
yahoomail
Gmail
Loading

Kirtan PatelPosted Nov 7, 2009, 10:34 PM
Providing you source code for gmail as i told please check "Do you like this answer " :)
For Gmail
------------------
First You have to Download and install Google Data API setup From Google .
using Google.GData.Contacts;
using Google.GData.Client;
using Google.GData.Extensions;
using Google.Contacts;
private void btnConnect_Click(object sender, EventArgs e)
{
// Validate User input
Username = txtUsername.Text.Trim();
if (Username.Contains("@gmail.com") == false)
{
Username = Username + "@gmail.com";
}
Password = txtPassword.Text.Trim();
//Start Process After Validating email
if (Username != "" && Password != "")
{
RequestSettings rs = new RequestSettings("MyGoogleContactSoftware",Username, Password);
rs.AutoPaging = true;
ContactsRequest cr = new ContactsRequest(rs);
// Uri feedUri = new Uri(ContactsQuery.CreateContactsUri("default"));
Feed confeed = cr.GetContacts();
foreach (Contact c in confeed.Entries)
{
listBox1.Items.Add(c.PrimaryEmail.Address);
}
}
else
{
MessageBox.Show("Values are Mendatory","Warning",MessageBoxButtons.OK,MessageBoxIcon.Exclamation);
}
}
Amit ChoudharyPosted Nov 9, 2009, 12:53 AM
Sam HobbsPosted Nov 7, 2009, 9:22 AM