Hi friends
I am developing one site in that i put the login and that login may also gmail users also.....how can i allow gmail credentials to my site login... how can i.............
Login with gmail into my site
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Jaganathan BantheswaranRank #170 · 14.1K reputationPosted Jul 18, 2011, 5:17 AM EDT
Download the IMAPX dll and add it to your project.
Add the below code.
ImapX.ImapClient client = new ImapX.ImapClient("imap.gmail.com", 993, true);
bool result = client.Connection();
if (result) {
result = client.LogIn("[email protected]", "userPassword");
if (result)
{
//Do stuffs for successfully logged in users.
}
else
{
//Invalid credential..
}
}
else {
MessageBox.Show("connection failed");
}