1

I am attempting to use the openpop.dll to pull email from gmail account. but I get the following error

Problem logging in using method Auto. Server response was: -ERR [AUTH] Username and password not accepted. Exception thrown: 'OpenPop.Pop3.Exceptions.InvalidLoginException' in OpenPop.dll

I rechecked my User and Password are correct (i can login from the gmail web interface).

In the app.config:

<add key="SmtpHost" value="pop.gmail.com"/>
<add key="SmtpPort" value="995"/>

My code:

client.Connect(Host, Port, true); //UseSSL true or false
LoggerService.Info("Service authentication starts.");
client.Authenticate(Email, Password);

Anyone have a suggestion?

Martin
  • 16,093
  • 1
  • 29
  • 48
  • I seem to remember that Gmail may no longer supports SMTP access using the account password - I think you have to generate a specific application password for it to use. – Martin Nov 05 '20 at 10:29

1 Answers1

2

1.Sign into the Gmail account first, and make sure POP is enabled in settings either for ALL MAIL or only for mail that arrives from now on - depending on what you want collected.

2.Google accounts will only allow POP3 access if you have enabled the "less secure apps" feature. This can be done from this link: https://www.google.com/settings/security/lesssecureapps

Let me know if this helpful for you.

So_oP
  • 1,211
  • 15
  • 31