This demo is created to test the Java Mail Clients, to configure MailService is jHipster application as suggested in jHipster Tip - Configuring Email with - Gmail
1.1.RELEASE
You must allow your Gmail account to access less secure apps.
Login to Gmail and visit Here to Turn On Access for less secure apps.
$ git clone https://github.com/RawSanj/java-mail-clients.git
- Update
ConfigConsts.java
file with to and from Email address and password. - Select the SMTP Server (GMAIL, YAHOO, OUTLOOK or ZOHO) and update the File path where the attachments are located.
- Run the
SendEmailWithAttachments
class as Java Application.
- Change the
sendToAddress
,sendFromAddress
andpassword
in the respective E-Mail client app and run as Java Application.
Refer below links for API and SMTP settings:
- JavaMail API - JavaMail : version-1.5.4
- GMail SMTP - Gmail SMTP Settings.
- Outlook SMTP - Outlook SMTP Settings.
- Yahoo SMTP - Yahoo SMTP Settings.
- Zoho SMTP - Zoho SMTP Settings.
The following tools are used to create this project :
- Eclipse
- Google Chrome
- Git
The MIT License (MIT)
Copyright (c) 2017. Sanjay Rawat