File tree Expand file tree Collapse file tree
gxmail/src/main/java/com/genexus/internet Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,8 +94,12 @@ public void login(GXPOP3Session sessionInfo)
9494 props .setProperty ("mail.pop3.connectiontimeout" , String .valueOf (timeout ));
9595 props .setProperty ("mail.pop3.timeout" , String .valueOf (timeout ));
9696
97- if (sessionInfo .getAuthenticationMethod ().length () > 0 ) {
98- props .setProperty ("mail.pop3.auth.mechanisms" , sessionInfo .getAuthenticationMethod ().toUpperCase ());
97+ String authMethod = sessionInfo .getAuthenticationMethod ();
98+ if (!authMethod .isEmpty ()) {
99+ props .setProperty ("mail.pop3.auth.mechanisms" , authMethod .toUpperCase ());
100+ if (authMethod .equalsIgnoreCase ("XOAUTH2" ) && pop3Host .equalsIgnoreCase ("outlook.office365.com" )) {
101+ props .setProperty ("mail.pop3.auth.xoauth2.two.line.authentication.format" , "true" );
102+ }
99103 }
100104
101105 props .setProperty ("mail.pop3.ssl.enable" , String .valueOf (secureConnection ));
You can’t perform that action at this time.
0 commit comments