3

This isn't a code specific question, but more of a general question regarding OAuth2. I maintain a system that for the past 20+ years has been able to easily connect to any SMTP enabled email server, then send an email (only requiring authentication info and a server path). This email account is always system related, and isn't specific to one user, such as support@.

With GMail and Office365 (and other major email providers) dropping support for SMTP direct sends, I have been learning OAuth2. With all the reading I've done, OAuth2 is very email server specific (or so it seems). But from a systems standpoint, I need to be able to send support email regardless of whom is logged into the system, and regardless of what email host, with no authentication popups.

Is a single solution even possible with OAuth2? Will I need to code for every email provider differently? (GMail, Office365, etc) (I can currently get an authorization token from Office 365, but it seems very specific to Office 365) I have yet to figure out how to actually send an email through Office365 with my OAuth2 token, since MailKit doesn't seem to support OAuth. Is there a single protocol that will allow me to send an OAuth2 token through any email host?

I understand how SMTP direct send has been abused for a long time, but replacing it sucks.

Jonathan Hansen
  • 423
  • 1
  • 7
  • 14

0 Answers0