From e3413d4c692bb6ad3248f0d3ee022e6e4811453e Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 27 May 2020 16:22:08 +0200 Subject: [PATCH] Split Outlook and Office365 "OAuth2 support for IMAP, POP, SMTP protocols is not supported for Outlook.com users" --- .../java/eu/faircode/email/FragmentOAuth.java | 4 ++-- app/src/main/res/xml/providers.xml | 15 +++++++++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentOAuth.java b/app/src/main/java/eu/faircode/email/FragmentOAuth.java index 59e04d74a0..3351eb796f 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOAuth.java +++ b/app/src/main/java/eu/faircode/email/FragmentOAuth.java @@ -282,7 +282,7 @@ public class FragmentOAuth extends FragmentBase { if ("gmail".equals(provider.id)) authRequestBuilder.setPrompt("consent"); - if ("outlook".equals(provider.id)) + if ("office365".equals(provider.id)) authRequestBuilder.setPrompt("select_account"); AuthorizationRequest authRequest = authRequestBuilder.build(); @@ -383,7 +383,7 @@ public class FragmentOAuth extends FragmentBase { if (askAccount) { primaryEmail = address; identities.add(new Pair<>(address, personal)); - } else if ("outlook".equals(id)) { + } else if ("office365".equals(id)) { // https://docs.microsoft.com/en-us/graph/api/user-get?view=graph-rest-1.0&tabs=http#http-request URL url = new URL("https://graph.microsoft.com/v1.0/me?$select=displayName,otherMails"); Log.i("Fetching " + url); diff --git a/app/src/main/res/xml/providers.xml b/app/src/main/res/xml/providers.xml index 50774e00b6..462290ee0b 100644 --- a/app/src/main/res/xml/providers.xml +++ b/app/src/main/res/xml/providers.xml @@ -33,6 +33,21 @@ host="smtp.office365.com" port="587" starttls="true" /> + + + +