smtp-mail
smtp-mail copied to clipboard
Support for OAuth authentication
This library supports PLAIN, LOGIN and CRAM_MD5 authentication mechanisms.
This issue is a feature request for OAuth2 based authentication for sending emails with this library, with a XOAUTH2 constructor for AuthType and supporting functions in Network/Mail/SMTP.hs.
Such that the SMTP client transmits this to the SMTP server:
AUTH XOAUTH2 <oauth token>
rather than providing a username and password as with LOGIN. Instead, a username and OAuth token would be provided.
It might be that this library would need to encode this information in SASL XOAUTH2 format.
I don't have access to Office365 nor any mail server using SASL XOAUTH2.
How could I test this against a real server after implementation? Are there freely available mail services providing this OAuth2 authentication?
Hi @typetetris ,
I've opened a pull request that implements OAuth authentication for this library.
PR: https://github.com/jhickner/smtp-mail/pull/38