Install provider

This commit is contained in:
M66B
2023-12-06 21:25:36 +01:00
parent 2fde15a52c
commit 7195603350
11 changed files with 93 additions and 8 deletions

View File

@@ -235,14 +235,14 @@ public class EmailService implements AutoCloseable {
Log.i("Timeout=" + timeout);
if (purpose == PURPOSE_SEARCH) {
properties.put("mail." + protocol + ".connectiontimeout", Integer.toString(timeout));
properties.put("mail." + protocol + ".writetimeout", Integer.toString(SEARCH_TIMEOUT));
//properties.put("mail." + protocol + ".writetimeout", Integer.toString(SEARCH_TIMEOUT));
properties.put("mail." + protocol + ".timeout", Integer.toString(SEARCH_TIMEOUT));
} else {
int factor = 2;
if ("smtp".equals(protocol) || "smtps".equals(protocol))
factor *= 2;
properties.put("mail." + protocol + ".connectiontimeout", Integer.toString(timeout));
properties.put("mail." + protocol + ".writetimeout", Integer.toString(timeout * factor));
//properties.put("mail." + protocol + ".writetimeout", Integer.toString(timeout * factor));
properties.put("mail." + protocol + ".timeout", Integer.toString(timeout * factor));
}