use of com.zimbra.cs.mailclient.imap.ImapConfig in project zm-mailbox by Zimbra.
the class TestImap method withLiteralPlus.
private void withLiteralPlus(boolean lp, RunnableTest test) throws Exception {
ImapConfig config = connection.getImapConfig();
boolean oldLp = config.isUseLiteralPlus();
config.setUseLiteralPlus(lp);
try {
test.run();
} finally {
config.setUseLiteralPlus(oldLp);
}
}
use of com.zimbra.cs.mailclient.imap.ImapConfig in project zm-mailbox by Zimbra.
the class TestImapThrottle method connect.
private ImapConnection connect() throws IOException {
ImapConfig config = new ImapConfig(HOST);
config.setPort(PORT);
config.setAuthenticationId(USER);
config.getLogger().setLevel(Log.Level.trace);
ImapConnection connection = new ImapConnection(config);
connection.connect();
connection.login(PASS);
connection.select("INBOX");
return connection;
}
use of com.zimbra.cs.mailclient.imap.ImapConfig in project zm-mailbox by Zimbra.
the class TestImapClient method testYahoo.
@Test
public void testYahoo() throws Exception {
ImapConfig config = new ImapConfig();
config.getLogger().setLevel(Log.Level.trace);
config.setHost("imap.mail.yahoo.com");
config.setAuthenticationId("dacztest");
connection = new ImapConnection(config);
connection.connect();
IDInfo id = new IDInfo();
id.put("guid", "unknown");
connection.id(id);
connection.login("test1234");
char delim = connection.getDelimiter();
assertEquals(0, delim);
createTestMailbox("Large", 10000);
}
use of com.zimbra.cs.mailclient.imap.ImapConfig in project zm-mailbox by Zimbra.
the class TestImapUtil method getImapInputStream.
private static ImapInputStream getImapInputStream(String[] folders) {
StringBuilder sb = new StringBuilder();
for (String folder : folders) {
sb.append("* LIST () \"/\" \"").append(folder).append("\"\r\n");
}
ImapConfig config = new ImapConfig();
return new ImapInputStream(new ByteArrayInputStream(Ascii.getBytes(sb.toString())), config);
}
use of com.zimbra.cs.mailclient.imap.ImapConfig in project zm-mailbox by Zimbra.
the class TestImap method connect.
private ImapConnection connect() throws IOException {
ImapConfig config = new ImapConfig(HOST);
config.setPort(PORT);
config.setAuthenticationId(USER);
config.getLogger().setLevel(Log.Level.trace);
ImapConnection connection = new ImapConnection(config);
connection.connect();
connection.login(PASS);
connection.select("INBOX");
return connection;
}
Aggregations