Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support XOAUTH2 for email sending for google and microsoft's smtp services dropping basic smtp auth #1213

Open
drdamour opened this issue Oct 10, 2024 · 0 comments

Comments

@drdamour
Copy link

drdamour commented Oct 10, 2024

google and microsoft are deprecating SMTP basic auth in their services and pushing for XOAUTH2 in MS case https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth

saw that https://github.com/wneessen/go-mail supports XOAUTH2...might be a path to move from net/smtp to that as net/smtp is marked frozen/not getting updates per golang/go#40817

but even getting the access token to use XOAUTH2 is very platform specific. I bet a lot of them support some form of client credentials flow. U've already got the parts for that from OAuth config so could piggy back on that to get an access token for email send with XOAUTH2 ... course i'm sure the resource/scope request part of the token acquisition would need to be platform specific.

if you wanted to get very azure/ms heavy in support adding an option to leverage manage identity via https://learn.microsoft.com/en-us/azure/developer/go/azure-sdk-authentication?tabs=bash#option-3-use-a-managed-identity for access token fetch would be really slick that's how most folks would want it to work in azure...in the ends that's a wrapper around an http calls to 169 address space that azure will fulfill.

@mattwoberts mattwoberts pinned this issue Oct 29, 2024
@mattwoberts mattwoberts unpinned this issue Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant