How to Configure Mail Server Using Gmail App Password in Odoo 16
If you generally need to approve a new account sign-in whenever you use GMail on another app, then your solution is to create an App Password.
When you sign up for 2-Step Verification, Google usually send you verification codes. However, these codes do not work with some apps and devices including Odoo. Instead, you’ll need to authorize the app or device the first time you use it to sign in to your Google Account by generating and entering an App password.
Sign in to Gmail account
Visit your app password page (https://myaccount.google.com/apppasswords)
Create the device you need to create app password
Enter the name and generate
Copy the generated app password
You will get the mail server configuration details from (https://support.google.com/mail/answer/7126229?hl=en#zippy=%2Cstep-change-smtp-other-settings-in-your-email-client)
Configure the outgoing mail server in Odoo
Configure the incoming mail server