mirror of https://github.com/M66B/FairEmail.git
Split Outlook and Office365
"OAuth2 support for IMAP, POP, SMTP protocols is not supported for Outlook.com users"
This commit is contained in:
parent
9a38441e14
commit
e3413d4c69
|
@ -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);
|
||||
|
|
|
@ -33,6 +33,21 @@
|
|||
host="smtp.office365.com"
|
||||
port="587"
|
||||
starttls="true" />
|
||||
</provider>
|
||||
<provider
|
||||
name="Office365"
|
||||
id="office365"
|
||||
link="https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq14"
|
||||
order="3"
|
||||
partial="false">
|
||||
<imap
|
||||
host="outlook.office365.com"
|
||||
port="993"
|
||||
starttls="false" />
|
||||
<smtp
|
||||
host="smtp.office365.com"
|
||||
port="587"
|
||||
starttls="true" />
|
||||
<oauth
|
||||
askAccount="true"
|
||||
authorizationEndpoint="https://login.microsoftonline.com/common/oauth2/v2.0/authorize"
|
||||
|
|
Loading…
Reference in New Issue