Independentsoft
- any library, any programming language
Home
Purchase
Support
Company
Contact
JWebServices for Exchange
>
Tutorial
> Add delegate
The following example shows you how to add delegate.
import com.independentsoft.exchange.DelegateFolderPermissionLevel; import com.independentsoft.exchange.DelegateUser; import com.independentsoft.exchange.DelegateUserResponse; import com.independentsoft.exchange.Mailbox; import com.independentsoft.exchange.Service; import com.independentsoft.exchange.ServiceException; public class Example { public static void main(String[] args) { try { Service service = new Service("https://myserver/ews/Exchange.asmx", "username", "password"); Mailbox mailbox = new Mailbox("username@mydomain.com"); DelegateUser delegateUser = new DelegateUser("John@mydomain.com"); delegateUser.setCalendarFolderPermissionLevel(DelegateFolderPermissionLevel.AUTHOR); DelegateUserResponse response = service.addDelegate(mailbox, delegateUser); } catch (ServiceException e) { System.out.println(e.getMessage()); System.out.println(e.getXmlMessage()); e.printStackTrace(); } } }
Need help? Ask our developers:
Name*
Email*
Message*