use of com.zimbra.soap.mail.message.CreateDataSourceRequest in project zm-mailbox by Zimbra.
the class TestDataSource method createPop3DataSource.
public static String createPop3DataSource(ZMailbox shareeMbox, String sharedAcctName, String dsFolderId) throws ServiceException {
CreateDataSourceRequest req = new CreateDataSourceRequest();
MailPop3DataSource pop3 = new MailPop3DataSource();
pop3.setUsername(sharedAcctName);
pop3.setPassword("test123");
pop3.setEnabled(true);
pop3.setHost("localhost");
pop3.setPort(Integer.valueOf(TestUtil.getServerAttr(Provisioning.A_zimbraPop3BindPort)));
pop3.setConnectionType(ConnectionType.cleartext);
pop3.setFolderId(dsFolderId);
pop3.setName("pop3datasource1");
req.setDataSource(pop3);
CreateDataSourceResponse resp = shareeMbox.invokeJaxb(req);
return resp.getDataSource().getId();
}
Aggregations