diff --git a/app/src/main/java/eu/faircode/email/FragmentOAuth.java b/app/src/main/java/eu/faircode/email/FragmentOAuth.java
index 5d95de4602..850d7abedd 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOAuth.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOAuth.java
@@ -75,6 +75,8 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import javax.mail.AuthenticationFailedException;
+
import static android.app.Activity.RESULT_OK;
public class FragmentOAuth extends FragmentBase {
@@ -95,6 +97,7 @@ public class FragmentOAuth extends FragmentBase {
private TextView tvError;
private TextView tvGmailDraftsHint;
+ private TextView tvOfficeAuthHint;
private Button btnSupport;
private Group grpError;
@@ -131,6 +134,7 @@ public class FragmentOAuth extends FragmentBase {
tvError = view.findViewById(R.id.tvError);
tvGmailDraftsHint = view.findViewById(R.id.tvGmailDraftsHint);
+ tvOfficeAuthHint = view.findViewById(R.id.tvOfficeAuthHint);
btnSupport = view.findViewById(R.id.btnSupport);
grpError = view.findViewById(R.id.grpError);
@@ -603,6 +607,10 @@ public class FragmentOAuth extends FragmentBase {
if ("gmail".equals(id))
tvGmailDraftsHint.setVisibility(View.VISIBLE);
+ if ("office365".equals(id) &&
+ ex instanceof AuthenticationFailedException)
+ tvOfficeAuthHint.setVisibility(View.VISIBLE);
+
btnOAuth.setEnabled(true);
pbOAuth.setVisibility(View.GONE);
@@ -617,5 +625,6 @@ public class FragmentOAuth extends FragmentBase {
private void hideError() {
grpError.setVisibility(View.GONE);
tvGmailDraftsHint.setVisibility(View.GONE);
+ tvOfficeAuthHint.setVisibility(View.GONE);
}
}
diff --git a/app/src/main/res/layout/fragment_oauth.xml b/app/src/main/res/layout/fragment_oauth.xml
index 7efb735e62..f60b4bedbc 100644
--- a/app/src/main/res/layout/fragment_oauth.xml
+++ b/app/src/main/res/layout/fragment_oauth.xml
@@ -132,6 +132,17 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvError" />
+
+
+ app:layout_constraintTop_toBottomOf="@id/tvOfficeAuthHint" />
Please grant permissions to select an account and read your name
Google will ask for permissions to read, compose, send and permanently delete all your email. FairEmail will never delete your messages without your explicit consent.If the drafts folder is not accessible by IMAP, this can be fixed in the Gmail label settings
+ The error \'AUTHENTICATE failed\' can be caused by IMAP/SMTP being disabled administrativelyAuthorize access to your %1$s accountAuthorizeSelect account