ews-java-api icon indicating copy to clipboard operation
ews-java-api copied to clipboard

How to get the response as email sending? E.g. (Delivery status of email: Sent Successful, Email Rejected)

Open Jackylaizgying opened this issue 8 years ago • 2 comments

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();
	}

Jackylaizgying avatar Jun 02 '17 08:06 Jackylaizgying

I also face this issue. Could you resolve it?

CamiYe avatar Jul 13 '18 01:07 CamiYe

me too

silmefly avatar Jun 26 '19 06:06 silmefly