zetacomponents/Mail — pull request #36 by iankberry (2014-12-02 16:12:55+00:00)
Title: Add XOAUTH2 authentication method to the SMTP transport

This PR adds support for using an OAuth2 token to authenticate with an SMTP server. Although not an RFC standard, it is becoming more common and is the recommended method for both [Gmail](https://developers.google.com/gmail/xoauth2_protocol) and [Outlook.com](http://msdn.microsoft.com/en-us/library/dn440163.aspx).

To use this method, set your `preferredAuthMethod` to `XOAUTH2`. The user is still required (normally the email address) and the password should be the full OAuth2 token.