commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1086456 - /commons/proper/net/trunk/src/main/java/examples/mail/POP3Mail.java
Date Tue, 29 Mar 2011 01:03:59 GMT
Author: sebb
Date: Tue Mar 29 01:03:59 2011
New Revision: 1086456

URL: http://svn.apache.org/viewvc?rev=1086456&view=rev
Log:
Add support for implicit mode

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

Modified: commons/proper/net/trunk/src/main/java/examples/mail/POP3Mail.java
URL: http://svn.apache.org/viewvc/commons/proper/net/trunk/src/main/java/examples/mail/POP3Mail.java?rev=1086456&r1=1086455&r2=1086456&view=diff
==============================================================================
--- commons/proper/net/trunk/src/main/java/examples/mail/POP3Mail.java (original)
+++ commons/proper/net/trunk/src/main/java/examples/mail/POP3Mail.java Tue Mar 29 01:03:59
2011
@@ -61,7 +61,7 @@ public final class POP3Mail
         if (args.length < 3)
         {
             System.err.println(
-                "Usage: POP3Mail <pop3 server hostname> <username> <password>
[TLS]");
+                "Usage: POP3Mail <pop3 server hostname> <username> <password>
[TLS [true=implicit]]");
             System.exit(1);
         }
 
@@ -70,12 +70,13 @@ public final class POP3Mail
         String password = args[2];
 
         String proto = args.length > 3 ? args[3] : null;
+        boolean implicit = args.length > 4 ? Boolean.parseBoolean(args[4]) : false;
 
         POP3Client pop3;
 
         if (proto != null) {
             System.out.println("Using secure protocol: "+proto);
-            pop3 = new POP3SClient(proto);
+            pop3 = new POP3SClient(proto, implicit);
         } else {
             pop3 = new POP3Client();
         }



Mime
View raw message