Uploaded image for project: 'Commons Email'
  1. Commons Email
  2. EMAIL-163

Support for OAuth2 authentication

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.4
    • None

    Description

      Starting with JavaMail 1.5.5, support for OAuth2 authentication is built-in and no longer requires SASL (although the SASL OAuth2 support continues to work).

      https://java.net/projects/javamail/pages/OAuth2

      It would be great if commons email could provide an API to support OAuth2 authentification.

      The following code should be integrated in Email.getMailSession:

      if (isOAuth2Authentication()) {
        props.put("mail.smtp.auth.mechanisms", "XOAUTH2");
      }
      

      Or a generic solution:

      if (this.authMechanisms != null) {
        props.put("mail.smtp.auth.mechanisms", this.authMechanisms);
      }
      

      Attachments

        Activity

          People

            sgoeschl Siegfried Goeschl
            ggrossetie Guillaume Grossetie
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: