Odoo.sh v16 using Google OAuth outgoing email server. I setup the server and connection according to the documentation here: https://www.odoo.com/documentation/16.0/applications/general/email_communication/google_oauth.html
Emails are getting sent, however, when other internal users in my odoo database send out an email from odoo, the FROM field of the email header is USERNAME, MYEMAIL@company.com . The from field will contain that users name, but it will have my (the admin) actual email address. Looking through the email logs in odoo, it appears that odoo is sending out the email correctly, with the users actual email address. Google must be changing the actual email address as it goes through their server.
After reading through google developer docs, it appears that I need to setup a service account with domain wide delegation in order for my admin OAuth to allow the email server to send out emails of other users. Can anyone confirm if this is true, and if so, how to do this? Here are links to some articles/documentation that I have reviewed.
https://stackoverflow.com/questions/57927771/change-from-address-while-sending-email-via-gmail-api
https://support.google.com/cloud/answer/6158849#zippy=%2Cservice-accounts%2Cweb-applications%2Cauthorized-domains%2Cuser-consent%2Cpublic-and-internal-applications
https://developers.google.com/workspace/guides/create-credentials
https://cloud.google.com/iam/docs/service-account-overview
Hey Rick! I just migrated my database over to using Google OAuth and Gmail as our outgoing server and I am having this exact same problem.
Have you found a solution to this yet?