Added auth disable debug options

This commit is contained in:
M66B
2020-07-12 11:19:03 +02:00
parent b96fd267f6
commit 6f94f223dc
4 changed files with 60 additions and 3 deletions

View File

@@ -145,11 +145,19 @@ public class EmailService implements AutoCloseable {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
this.harden = prefs.getBoolean("ssl_harden", false);
boolean auth_plain = prefs.getBoolean("auth_plain", true);
boolean auth_login = prefs.getBoolean("auth_login", true);
boolean auth_sasl = prefs.getBoolean("auth_sasl", true);
Log.i("Authenticate plain=" + auth_plain + " login=" + auth_login + " sasl=" + auth_sasl);
properties.put("mail.event.scope", "folder");
properties.put("mail.event.executor", executor);
if (!auth_plain)
properties.put("mail." + protocol + ".auth.plain.disable", "true");
if (!auth_login)
properties.put("mail." + protocol + ".auth.login.disable", "true");
properties.put("mail." + protocol + ".sasl.enable", "true");
if (auth_sasl) {
properties.put("mail." + protocol + ".sasl.mechanisms", "CRAM-MD5");