In this video I'm showing how to programmatically send email in Java using the Gmail API, how to configure your Gmail account, and how to create and use credentials.
For more information see: https://blog.sebastian-daschner.com/entries/sending-emails-gmail-api-java