This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I suppose it's possible that you might have more than a theoretical question. In case you were interested in how to do that, go to the JavaMail section of the Ranch's JavaEnterpriseEditionFaq and follow some of the links there. Also there are example programs in the JavaMail download.