Java Mail Clients
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
Note (for Gmail)
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.
Installation
$ git clone https://github.com/RawSanj/java-mail-clients.git
Updated Version (added support for Attachments):
- 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.
Older Version:
- Change the
sendToAddress
,sendFromAddress
andpassword
in the respective E-Mail client app and run as Java Application.
Reference
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.