This is a basic code for sending mail via EWS and SMTP
The following jars should be added in the project build path
- commons-codec-1.9.jar
- commons-lang3-3.4.jar
- commons-logging-1.2.jar
- ews-java-api-2.0.jar
- httpclient-4.4.1.jar
- httpcore-4.4.1.jar
- joda-time-2.8.jar
- Email id which is used to open microsoft account
- That microsoft account password
The following jars should be added in the project build path
- javax.mail.jar
- smtp-1.4.5.jar
- gmail id
- gmail id's password
In my EmailMessenger.java code in line number 121 there has a line
message.setFrom(new InternetAddress(this.smtpFrom, "National University of Singapore")); // from , viewView before opening the mail will be as bellow:
View after opening the mail will be as bellow:

View before opening the mail will be as bellow:
Basically daihan.work is the username which is displayed before opening the mail. This is what we actually see as usual .
