File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed
gxmail/src/main/java/com/genexus/internet Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ public class GXPOP3Session implements GXInternetConstants
1010 private String userName ;
1111 private String password ;
1212 private short timeout ;
13+ private String authenticationProtocol ;
1314
1415 private String attachDir ;
1516 private short newMessages ;
@@ -40,6 +41,7 @@ public GXPOP3Session()
4041 setUserName ("" );
4142 setPassword ("" );
4243 setTimeout (30 );
44+ setAuthenticationMethod ("" );
4345
4446 errDescription = "" ;
4547 }
@@ -84,6 +86,16 @@ public String getPassword()
8486 return password ;
8587 }
8688
89+ public void setAuthenticationMethod (String authenticationProtocol )
90+ {
91+ this .authenticationProtocol = authenticationProtocol ;
92+ }
93+
94+ public String getAuthenticationMethod ()
95+ {
96+ return this .authenticationProtocol ;
97+ }
98+
8799 public void setSecure (short secure )
88100 {
89101 this .secure = secure ;
Original file line number Diff line number Diff line change @@ -92,7 +92,12 @@ public void login(GXPOP3Session sessionInfo)
9292 props .setProperty ("mail.pop3.host" , pop3Host );
9393 props .setProperty ("mail.pop3.port" , String .valueOf (pop3Port ));
9494 props .setProperty ("mail.pop3.connectiontimeout" , String .valueOf (timeout ));
95- props .setProperty ("mail.pop3.timeout" , String .valueOf (timeout ));
95+ props .setProperty ("mail.pop3.timeout" , String .valueOf (timeout ));
96+
97+ if (sessionInfo .getAuthenticationMethod ().length () > 0 ) {
98+ props .setProperty ("mail.pop3.auth.mechanisms" , sessionInfo .getAuthenticationMethod ().toUpperCase ());
99+ }
100+
96101 props .setProperty ("mail.pop3.ssl.enable" , String .valueOf (secureConnection ));
97102
98103 session = Session .getInstance (props );
You can’t perform that action at this time.
0 commit comments