odooodoo-12

outgoing mail server on odoo


I have created a record on "ir.mail_server" model which is the outgoing mail server model. configured as:

SMTP Server =  smtp.gmail.com
SMTP port = 465
Connection Security  =  SSL/TLS
Username = my gmail id
Password = my gmail password

tested the connection too gives me a message that"Connection Test Succeeded! Everything seems properly set up! "

previously this was working perfectly

but now when I send an invoice through mail in odoo its sent without error but the recipient is not receiving the mail

any help will be appreciated


Solution

  • Google made updates to the security measures related to app access, so you will not be able to use password. You need to use App Passwords.

    In your Google account: Go to Manage your Google Account and select Security:

    1. Turn on 2-Step Verification.
    2. Once the 2-Step Verification turned on, the app passwords option will be enabled and it will be shown under 2-step verification.
    3. Click on App passwords and create an App password and copy the 16 digits password which you got.
    4. Use that 16 digits instead of the password in the Odoo email configuration settings

    You can refer to google help for more details about how to create app passwords.