You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. Is there have plans for developing https://java.net/projects/javamail/pages/OAuth2 this sort of auth? If anybody needs this feature I can start implementing it to play mailer on next week.
The text was updated successfully, but these errors were encountered:
Jacke
changed the title
OAuth Auth for GMAIL to avoid "less secure apps"
OAuth Auth for Gmail(and OAuth token based mail services) to avoid "less secure apps"
Mar 28, 2016
Behind the scene, play mailer plugin is using commons-email library which relies on Java mail 1.5.2.
If I read correctly OAuth2 Authentication is only available from Java mail 1.5.5 and later ?
I think you should open an issue to commons-email library to ask for an upgrade from 1.5.2 to 1.5.5: commons-email issue tracker
In the mean time you can experiment by excluding Java mail 1.5.2 dependency and adding explicitly a dependency on Java mail 1.5.5 in build.sbt
I think you can already do it by setting a system property: System.setProperty("mail.smtp.auth.mechanisms", "XOAUTH2");. The mail session is using system properties so this code is equivalent to:
As far as I know, only this property is required to switch to an OAuth2 authentication. I've also open on Commons Email because I think it's better to have a dedicated API to set the authentication mechanism: https://issues.apache.org/jira/browse/EMAIL-163
@litts@Jacke Could you please give it a try ? thanks
Hi. Is there have plans for developing https://java.net/projects/javamail/pages/OAuth2 this sort of auth? If anybody needs this feature I can start implementing it to play mailer on next week.
The text was updated successfully, but these errors were encountered: