Improvements, fixes

This commit is contained in:
M66B
2018-08-27 15:08:23 +00:00
parent bc30dee6a1
commit 4d7c3e9c88
4 changed files with 46 additions and 10 deletions

View File

@@ -98,9 +98,11 @@ public class MessageHelper {
props.put("mail.mime.decodetext.strict", "false");
// https://javaee.github.io/javamail/OAuth2
Log.i(Helper.TAG, "Auth type=" + auth_type);
if (auth_type == Helper.AUTH_TYPE_GMAIL) {
props.put("mail.imaps.auth.mechanisms", "XOAUTH2");
props.put("mail.smtps.auth.mechanisms", "XOAUTH2");
props.put("mail.smtp.auth.mechanisms", "XOAUTH2");
}
return props;