commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1084630 - /commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java
Date Wed, 23 Mar 2011 16:24:24 GMT
Author: sebb
Date: Wed Mar 23 16:24:24 2011
New Revision: 1084630

URL: http://svn.apache.org/viewvc?rev=1084630&view=rev
Log:
Add Command Listener

Modified:
    commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java

Modified: commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java?rev=1084630&r1=1084629&r2=1084630&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java (original)
+++ commons/proper/net/trunk/src/main/java/examples/mail/IMAPMail.java Wed Mar 23 16:24:24
2011
@@ -19,6 +19,7 @@ package examples.mail;
 
 import java.io.IOException;
 
+import org.apache.commons.net.PrintCommandListener;
 import org.apache.commons.net.imap.IMAPClient;
 import org.apache.commons.net.imap.IMAPSClient;
 
@@ -61,6 +62,9 @@ public final class IMAPMail
         // We want to timeout if a response takes longer than 60 seconds
         imap.setDefaultTimeout(60000);
 
+        // suppress login details
+        imap.addProtocolCommandListener(new PrintCommandListener(System.out, true));
+
         try
         {
             imap.connect(server);



Mime
View raw message