Reputation: 163
I am using Spring Boot 1.5.9.RELEASE to send an email with spring-boot-starter-mail artifact provided. I was sending email in a non-secure mode of the Gmail account and now I am willing to move to secure access using OAuth 2 Authentication.
I've already created the sample code in a non-spring way to send an email using OAuth 2 Authentication.
Is there any way to autoconfigure OAuth2 Authentication for email sending with access-token and automatic handling of token refresh after expiry?
Upvotes: 4
Views: 2176
Reputation: 548
This is a library to send emails using Spring boot and the Gmail API. It is optimised for Google App Engine, but you can easily override the DataStore Factory and create your own. Hope it helps. https://github.com/3wks/spring-gae-gmail
Upvotes: 0