JavaMail: How to send email from Google with XOAUTH2

The original articles are here Chariot Solutions: Sending Mail via GMail with JavaMail and here Java.net JavaMail OAuth2 Support but in order to get my application to work I had to make some changes that included parts from both articles. [Read More]