diff --git a/app/src/main/java/eu/faircode/email/FragmentOAuth.java b/app/src/main/java/eu/faircode/email/FragmentOAuth.java
index 30b15e0561..17888a34e2 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOAuth.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOAuth.java
@@ -95,6 +95,7 @@ import java.util.Map;
import java.util.Set;
import javax.mail.AuthenticationFailedException;
+import javax.mail.MessagingException;
import javax.net.ssl.HttpsURLConnection;
public class FragmentOAuth extends FragmentBase {
@@ -1134,6 +1135,21 @@ public class FragmentOAuth extends FragmentBase {
else
tvOfficeAuthHint.setText(R.string.title_setup_office_auth);
tvOfficeAuthHint.setVisibility(View.VISIBLE);
+ } else if (ex instanceof MessagingException) {
+ boolean notconnected = false;
+ Throwable e = ex;
+ while (e != null) {
+ String msg = e.getMessage();
+ if (msg != null && msg.contains("User is authenticated but not connected")) {
+ notconnected = true;
+ break;
+ }
+ e = e.getCause();
+ }
+ if (notconnected) {
+ tvOfficeAuthHint.setText(R.string.title_setup_office_not_connected);
+ tvOfficeAuthHint.setVisibility(View.VISIBLE);
+ }
}
}
diff --git a/app/src/main/res/layout/fragment_oauth.xml b/app/src/main/res/layout/fragment_oauth.xml
index 39ab3e6faa..fe38e99173 100644
--- a/app/src/main/res/layout/fragment_oauth.xml
+++ b/app/src/main/res/layout/fragment_oauth.xml
@@ -288,6 +288,7 @@
android:text="@string/title_setup_office_auth"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
android:textColor="?android:attr/textColorPrimary"
+ android:textStyle="bold|italic"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvError" />
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 85b65e1a9c..722cae5ce8 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -254,6 +254,11 @@
The error \'AUTHENTICATE failed\' can be caused by IMAP/SMTP being disabled by the system administrator
Please try the \'Other provider\' quick setup wizard.
Please try the \'Outlook/Hotmail/Live\' quick setup wizard.
+
+ The error \'User is authenticated but not connected\' mostly means that IMAP is disabled.
+ In the case of a consumer Outlook account, please go to the Outlook website, tap on the settings wheel at the top right, select \'Mail\', select \'Forwarding and IMAP\', and in the section \'POP and IMAP\' enable \'Let devices and apps use IMAP\'.
+ In the case of a corporate, education, etc. account, please contact the system administrator of the e-mail server.
+
Authorize access to your %1$s account
Authorize an existing account again (otherwise create a new account)
Account authorization was updated