# Gmail POP3 authentication failed — switch to application password

**URL:** https://meta.discourse.org/t/gmail-pop3-authentication-failed-switch-to-application-password/109677
**Category:** Support
**Created:** [February 20, 2019, 5:29pm UTC](https://meta.discourse.org/t/gmail-pop3-authentication-failed-switch-to-application-password/109677 "2019-02-20T17:29:51Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [February 20, 2019, 5:29pm UTC](https://meta.discourse.org/t/gmail-pop3-authentication-failed-switch-to-application-password/109677/1 "2019-02-20T17:29:51Z")

</div>

After updating, my POP3 will not authenticate, nothing has changed except updating to latest. I logged in to gmail in a browser with the same credentials no problem. Here is the error in the logs:

```plaintext
/usr/local/lib/ruby/2.5.0/net/pop.rb:1006:in `check_response_auth'
/usr/local/lib/ruby/2.5.0/net/pop.rb:905:in `auth'
/usr/local/lib/ruby/2.5.0/net/pop.rb:567:in `do_start'
/usr/local/lib/ruby/2.5.0/net/pop.rb:531:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:41:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:16:in `execute'
/var/www/discourse/app/jobs/base.rb:137:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.6/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/app/jobs/base.rb:127:in `block in perform'
/var/www/discourse/app/jobs/base.rb:123:in `each'
/var/www/discourse/app/jobs/base.rb:123:in `perform'
/var/www/discourse/app/jobs/base.rb:185:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_scheduler-0.9.1/lib/mini_scheduler/manager.rb:82:in `process_queue'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_scheduler-0.9.1/lib/mini_scheduler/manager.rb:30:in `block in initialize'

```

Edit: I tried testing POP3 via [Test your SSL POP3 Mail Server • Wormly Monitoring](https://www.wormly.com/test-pop3-mail-server) and got this error:

```plaintext
S:-ERR [AUTH] Web login required: https://support.google.com/mail/answer/78754
ERROR: Login failed -ERR [AUTH] Web login required: https://support.google.com/mail/answer/78754
POP3 test failed.

```

But, I have logged in a browser. So I guess it’s not a discourse issue, but I would appreciate any ideas. I tried turning on less secure apps

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [February 20, 2019, 6:39pm UTC](https://meta.discourse.org/t/gmail-pop3-authentication-failed-switch-to-application-password/109677/2 "2019-02-20T18:39:09Z")

</div>

Same issue. It started this morning on my one week-old Discourse version, so it’s not a change in Discourse, but something that Google did.

Like @davidkingham I have " [Less secure app access](https://myaccount.google.com/u/2/security)" enabled and I can log in to Gmail via browser with existing credentials.

 ![52%20AM](https://global.discourse-cdn.com/meta/original/3X/1/a/1a2670d9a688b3119160f8a1d3b0a981cbd61524.png)

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [February 20, 2019, 6:43pm UTC](https://meta.discourse.org/t/gmail-pop3-authentication-failed-switch-to-application-password/109677/3 "2019-02-20T18:43:34Z")

</div>

Maybe try using Application Password instead of regular password?

---

<div class="post-metadata">

### Author: ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)
#### Post date: [February 20, 2019, 7:05pm UTC](https://meta.discourse.org/t/gmail-pop3-authentication-failed-switch-to-application-password/109677/4 "2019-02-20T19:05:00Z")

</div>

That worked, @itsbhanusharma - thanks.

In case this is something others encounter, to switch to an application password see:

> **[Sign in with app passwords - Google Account Help](https://support.google.com/accounts/answer/185833?hl=en)**
>
> Important: App passwords aren't recommended and are unnecessary in most cases. To help keep your account secure, use "Sign in with Google" to connect apps to your Google Account. An app password is a

---

<div class="post-metadata">

### Author: ![itsbhanusharma](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/itsbhanusharma/32/180717_2.png) [@itsbhanusharma](https://meta.discourse.org/u/itsbhanusharma)
#### Post date: [February 20, 2019, 7:08pm UTC](https://meta.discourse.org/t/gmail-pop3-authentication-failed-switch-to-application-password/109677/5 "2019-02-20T19:08:54Z")

</div>

Gmail is trying to be more secure.  
Unless you have specific reasons to poll gmail, maybe consider running the mail-reciever container to handle incoming emails.

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [February 20, 2019, 7:51pm UTC](https://meta.discourse.org/t/gmail-pop3-authentication-failed-switch-to-application-password/109677/6 "2019-02-20T19:51:19Z")

</div>

This worked for me as well, FYI for others when creating the key; under the app dropdown, select ‘other’, not mail. Thank you @itsbhanusharma

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [March 22, 2019, 8:04pm UTC](https://meta.discourse.org/t/gmail-pop3-authentication-failed-switch-to-application-password/109677/7 "2019-03-22T20:04:59Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
