The server said

This commit is contained in:
M66B
2020-08-09 13:46:46 +02:00
parent 1d042c2672
commit d7d0f244e9
2 changed files with 10 additions and 0 deletions

View File

@@ -352,6 +352,15 @@ public class EmailService implements AutoCloseable {
AuthState authState = OAuthRefresh(context, provider, password);
connect(host, port, auth, user, authState.getAccessToken(), factory);
return authState.jsonSerializeString();
} else if (purpose == PURPOSE_CHECK) {
String msg = ex.getMessage();
if (msg != null)
msg = msg.trim();
if (TextUtils.isEmpty(msg))
throw ex;
throw new AuthenticationFailedException(
context.getString(R.string.title_service_auth, msg),
ex.getNextException());
} else
throw ex;
} catch (MailConnectException ex) {