ews-java-api
ews-java-api copied to clipboard
How to get the response as email sending? E.g. (Delivery status of email: Sent Successful, Email Rejected)
How to get the response as email sending? I have checked the source, but I cannot get any idea on it. e.g. Rejected, Sent and Failed for # delivery status of email.
ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
ExchangeCredentials credentials = new WebCredentials(senderAddress, senderPassword);
try{
service.setCredentials(credentials);
service.setUrl(new URI(exchangeURL));
EmailMessage msg= new EmailMessage(service);
msg.setSubject("Hello world!");
msg.setBody(MessageBody.getMessageBodyFromText("<table border='1'><tr><td>Sent using the EWS Java API.</td><td>This book..</td></tr></table>"));
try{
msg.getToRecipients().add("[email protected]");
//msg.send();
msg.sendAndSaveCopy();
}catch (Exception ex){
ex.printStackTrace();
}
I also face this issue. Could you resolve it?
me too