Navi
Navi

Reputation: 1052

Odoo email usersname and password not accepted for configuring outgoing mail servers

While configuring the outgoing email server, I am facing the issue which I have shown below in the image.

enter image description here

Connection Test Failed! Here is what we got instead:
535
5.7.8 Username and Password not accepted. Learn more at
5.7.8 https://support.google.com/mail/?p=BadCredentials d80sm175552804pfm.146 - 
gsmtp

How can resolve this issue?

Upvotes: 0

Views: 5092

Answers (2)

forvas
forvas

Reputation: 10189

I have experienced this problem on many customer mail servers, and sometimes the problem can be a bit more complex, when the option Allow less secure apps is missing in your Google account configuration.

Option 1: Allow less secure apps is visible in your Google account configuration

Do what @khelili miliana said. You can do it directly clicking on this link:

Check Google account less secure apps status

If you see the option Allow access to less security apps: NO, set the toogle button to YES. That is the easiest way. If you do not see the option, you will have to apply options 2/3.

Option 2: Allow less secure apps is missing in your Google account configuration due to GSuite settings

The problem is, if instead of that, you see the message This setting is managed by your domain administrator.

In this case, as the message says, an administrator is managing these and other settings through GSuite. You will have to ask him to do the following steps, or do them in your own if you are the domain administrator (steps taken form the answer https://webapps.stackexchange.com/questions/116251/this-setting-is-managed-by-your-domain-administrator):

  • Sign in to your Google Admin console. Sign in using an administrator account.
  • Go to Security and then Basic settings in the admin console dashboard.
  • To see Security on the dashboard, you might have to click More controls at the bottom.
  • Under Less secure apps, select Go to settings for less secure apps.
  • In the subwindow, select the Enable access to less secure apps for all users radio button. You can enable the less secure apps for specific users or allow them enable the apps in their own (in this case they will have to click on the very first link I have written in this answer to enable the apps access).

The modification can take to GSuite over 24 hours to be enabled.

Option 3: Allow less secure apps is missing in your Google account configuration due to 2-step verification

Other problem could be that the you have 2-step verification enabled. When this happens, less secure apps section is not available. So you need to create an application specific password (to be used in place of your regular password) for any client/application/device that doesn't know how to ask for the 2-step code (like Odoo). Check this: https://support.google.com/mail/bin/answer.py?hl=en&answer=1173270

Upvotes: 1

khelili miliana
khelili miliana

Reputation: 3822

I think that your configuration is OK, but that doesn't enough to send email from odoo, you have to configure your email account too

  1. Navigate to https://myaccount.google.com/
  2. Click on Apps with account access
  3. Than select 'Allow less secure apps'

enter image description here

Upvotes: 3

Related Questions