Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
JWebServices for Exchange
>
Tutorial
> Mark all items as read
The following example shows you how to get mark all items as read.
import com.independentsoft.exchange.RequestServerVersion; import com.independentsoft.exchange.Response; import com.independentsoft.exchange.Service; import com.independentsoft.exchange.ServiceException; import com.independentsoft.exchange.StandardFolder; public class Example { public static void main(String[] args) { try { Service service = new Service("https://myserver/ews/Exchange.asmx", "username", "password"); service.setRequestServerVersion(RequestServerVersion.EXCHANGE_2013); Response response1 = service.markAllItemsAsRead(StandardFolder.INBOX, true); //mark all as read Response response2 = service.markAllItemsAsRead(StandardFolder.INBOX, false); //mark all as unread } catch (ServiceException e) { System.out.println(e.getMessage()); System.out.println(e.getXmlMessage()); e.printStackTrace(); } } }
Need help? Ask our developers:
Name*
Email*
Message*