1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2024-12-26 09:47:13 +00:00

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) {

View file

@ -676,6 +676,7 @@
<string name="title_oauth_support">OAuth is not supported</string>
<string name="title_review">Review</string>
<string name="title_hint_alias">Long press an identity to display options, like copy to create alias identities</string>
<string name="title_service_auth">The email server said: \'%1$s\'</string>
<string name="title_service_vpn">This might be caused by the VPN that is being used</string>
<string name="title_service_port">Please double check the port number</string>
<string name="title_service_protocol">Please double check the protocol (SSL/TLS or STARTTLS)</string>