foens/hpop

not works for gmail, what should do for?

Tinario opened this issue · 11 comments

Pop3Client pop3Client = new Pop3Client();
try
{
pop3Client.Connect("pop.gmail.com", 995, true);
pop3Client.Authenticate("email", "password");
pop3Client.Disconnect();
return true;
}
catch (OpenPop.Pop3.Exceptions.InvalidLoginException ex)
{
MessageBox.Show(ex.Message + "\nPlease take a look at "Email" and "Password" fields, verify if both are correct.");
return false;
}

i tried for microsoft hotmail and works perfectly, but for gmail give me exception "Server did not accept user credentials", but the credentials are correct, i logged manually on browser to see if is correct.
what should i do?

Do you have pop3 enabled for your account?
On 25 Jun 2015 22:15, "Tinario" notifications@github.com wrote:

Pop3Client pop3Client = new Pop3Client();
try
{
pop3Client.Connect("pop.gmail.com", 995, true);
pop3Client.Authenticate("email", "password");
pop3Client.Disconnect();
return true;
}
catch (OpenPop.Pop3.Exceptions.InvalidLoginException ex)
{
MessageBox.Show(ex.Message + "\nPlease take a look at "Email" and
"Password" fields, verify if both are correct.");
return false;
}

i tried for microsoft hotmail and works perfectly, but for gmail give me
exception "Server did not accept user credentials", but the credentials are
correct, i logged manually on browser to see if is correct.
what should i do?


Reply to this email directly or view it on GitHub
#39.

yes, i enabled it on gmail configuration / Forwarding and POP/IMAP

i think not, bcz i tried with a normal email and password too, without non ascii characters

finally i found the solution, and i will describe here.
1-enable the pop at Configurations / Forwarding and POP/IMAP
2- follow this link: https://www.google.com/settings/security/lesssecureapps
and activate for less secure apps.

thank you so much foens, have a nice day.

You too - glad you found a solution.

Thanks for this solution, I had the same problem and I solved it following the link that you sent and pressing the "turn on" option.

Hey friends,

I have a quick question. Even i faced the same problem for getting authenticated to gmail service account using POP3. I followed the instructions said above and was able to authenticate successfully. But i have a question like since we made the security for gmail service account as less secure. Does it impact any way?? or is there any drawbacks or something? please clarify my doubt. Help will be greatly appreciated.

Thanks
Javeria Nasir

foens commented

Is it less secure because you enabled POP3?

Yeah I am using POP3

Hey friends,
I am facing issue when I am trying to connect the Businss microsoft which ends with domain name (abc@abc.com). I am getting these error "ERR Logon failure: unknown user name or bad password." "Server did not accept user credentials" in the authenticate method. When I am trying to access email by using same credentials then I am able to login.

image
I am using the Pop3client to connect with outlook.office.com server and port number 995.
Is there any setting in the microsoft mail to allow less secure apps.
Thanks
Ashish Rajput