Wizards: set max message size

This commit is contained in:
M66B
2020-07-02 13:52:42 +02:00
parent 6da0031a32
commit 555a003805
3 changed files with 9 additions and 0 deletions

View File

@@ -467,6 +467,7 @@ public class FragmentOAuth extends FragmentBase {
}
Log.i("OAuth checking SMTP provider=" + provider.id);
Long max_size;
String iprotocol = (provider.smtp.starttls ? "smtp" : "smtps");
try (EmailService iservice = new EmailService(
context, iprotocol, null, false, EmailService.PURPOSE_CHECK, true)) {
@@ -475,6 +476,7 @@ public class FragmentOAuth extends FragmentBase {
EmailService.AUTH_TYPE_OAUTH, provider.id,
primaryEmail, state,
null, null);
max_size = iservice.getMaxSize();
}
Log.i("OAuth passed provider=" + provider.id);
@@ -550,6 +552,7 @@ public class FragmentOAuth extends FragmentBase {
ident.password = state;
ident.synchronize = true;
ident.primary = ident.user.equals(ident.email);
ident.max_size = max_size;
ident.id = db.identity().insertIdentity(ident);
EntityLog.log(context, "OAuth identity=" + ident.name + " email=" + ident.email);