1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 19:22:22 -05:00
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@806 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-10-30 15:13:06 +00:00
parent e4ff8946d9
commit 3471a6dbab

View File

@ -4,13 +4,17 @@ import davmail.Settings;
import davmail.http.DavGatewaySSLProtocolSocketFactory;
/**
*
* Test Exchange session
*/
public class TestExchangeSession {
protected TestExchangeSession() {
private TestExchangeSession() {
}
/**
* main method
* @param argv command line arg
*/
public static void main(String[] argv) {
// register custom SSL Socket factory
int currentArg = 0;
@ -23,17 +27,10 @@ public class TestExchangeSession {
// test auth
try {
ExchangeSessionFactory.checkConfig();
session = ExchangeSessionFactory.getInstance(argv[currentArg++], argv[currentArg++]);
session = ExchangeSessionFactory.getInstance(argv[currentArg++], argv[currentArg]);
ExchangeSession.Folder folder = session.getFolder("INBOX");
long startTime = System.currentTimeMillis();
ExchangeSession.MessageList messageList = session.getAllMessageUidAndSize(folder.folderUrl);
System.out.println("******");
for (ExchangeSession.Message message : messageList) {
message.write(System.out);
}
System.out.println("Elapsed time " + (System.currentTimeMillis() - startTime) + " ms");
folder.loadMessages();
//session.purgeOldestTrashAndSentMessages();