Posts

Showing posts from December, 2014

Integrate Microsoft Email Webservice Service (EWS) using JAVA

In this post we will see how to integrate the Microsoft Email Webservice (EWS) with JAVA using the open source EWS-JAVA-API.  Download the ews-java-api source code here. ews-java-api I was not able to find the binaries for ews-java-api, thus I build the project using maven. Below lib are need to run the JAVA program: 1. Binary for ews-java-api . 2. jcifs-1.3.17.jar 3. httpcore-4.3.3.jar 4. httpclient-4.3.6.jar 5. commons-logging-1.2.jar 6. commons-codec-1.6.jar 7. commons-cli-1.2.jar Please find the simple program to send the email using MS-EWS. The program is explain with the comments inline. The HTTPS i.e. SSL url is used, there is no need to include the certificate in credential store as the API internally validate the certs. package com; import java.net.URI; import microsoft.exchange.webservices.data.EmailMessage; import microsoft.exchange.webservices.data.ExchangeCredentials; import microsoft.exchange.webservices.data.ExchangeService; import microsoft.exchange