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.............
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jaganathan BantheswaranPosted Jul 18, 2011, 9:17 AM
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");
}