mirror of https://github.com/M66B/FairEmail.git
Combined Outlook/Office 365
This commit is contained in:
parent
66739d07ed
commit
903867fb39
4
FAQ.md
4
FAQ.md
|
@ -2767,9 +2767,7 @@ OAuth for non on-device accounts is not supported
|
||||||
because Google requires a [yearly security audit](https://support.google.com/cloud/answer/9110914) ($15,000 to $75,000) for this.
|
because Google requires a [yearly security audit](https://support.google.com/cloud/answer/9110914) ($15,000 to $75,000) for this.
|
||||||
You can read more about this [here](https://www.theregister.com/2019/02/11/google_gmail_developer/).
|
You can read more about this [here](https://www.theregister.com/2019/02/11/google_gmail_developer/).
|
||||||
|
|
||||||
OAuth for Yandex and Yahoo is supported via the quick setup wizard.
|
OAuth for Outlook/Office 365, Yahoo, Mail.ru and Yandex is supported via the quick setup wizard.
|
||||||
|
|
||||||
OAuth for Office 365 accounts is supported, but Microsoft does not offer OAuth for Outlook, Live and Hotmail accounts (yet?).
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,6 @@ import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import javax.mail.AuthenticationFailedException;
|
import javax.mail.AuthenticationFailedException;
|
||||||
|
@ -104,7 +103,6 @@ public class FragmentOAuth extends FragmentBase {
|
||||||
private TextView tvError;
|
private TextView tvError;
|
||||||
private TextView tvGmailDraftsHint;
|
private TextView tvGmailDraftsHint;
|
||||||
private TextView tvOfficeAuthHint;
|
private TextView tvOfficeAuthHint;
|
||||||
private TextView tvOfficeOutlookHint;
|
|
||||||
private Button btnSupport;
|
private Button btnSupport;
|
||||||
|
|
||||||
private Group grpError;
|
private Group grpError;
|
||||||
|
@ -143,7 +141,6 @@ public class FragmentOAuth extends FragmentBase {
|
||||||
tvError = view.findViewById(R.id.tvError);
|
tvError = view.findViewById(R.id.tvError);
|
||||||
tvGmailDraftsHint = view.findViewById(R.id.tvGmailDraftsHint);
|
tvGmailDraftsHint = view.findViewById(R.id.tvGmailDraftsHint);
|
||||||
tvOfficeAuthHint = view.findViewById(R.id.tvOfficeAuthHint);
|
tvOfficeAuthHint = view.findViewById(R.id.tvOfficeAuthHint);
|
||||||
tvOfficeOutlookHint = view.findViewById(R.id.tvOfficeOutlookHint);
|
|
||||||
btnSupport = view.findViewById(R.id.btnSupport);
|
btnSupport = view.findViewById(R.id.btnSupport);
|
||||||
|
|
||||||
grpError = view.findViewById(R.id.grpError);
|
grpError = view.findViewById(R.id.grpError);
|
||||||
|
@ -688,13 +685,6 @@ public class FragmentOAuth extends FragmentBase {
|
||||||
if ("office365".equals(id)) {
|
if ("office365".equals(id)) {
|
||||||
if (ex instanceof AuthenticationFailedException)
|
if (ex instanceof AuthenticationFailedException)
|
||||||
tvOfficeAuthHint.setVisibility(View.VISIBLE);
|
tvOfficeAuthHint.setVisibility(View.VISIBLE);
|
||||||
|
|
||||||
String e = etEmail.getText().toString().toLowerCase(Locale.ROOT);
|
|
||||||
if (e.contains("@outlook") ||
|
|
||||||
e.contains("@live") ||
|
|
||||||
e.contains("@hotmail") ||
|
|
||||||
e.contains("@msn"))
|
|
||||||
tvOfficeOutlookHint.setVisibility(View.VISIBLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
etName.setEnabled(true);
|
etName.setEnabled(true);
|
||||||
|
@ -715,6 +705,5 @@ public class FragmentOAuth extends FragmentBase {
|
||||||
grpError.setVisibility(View.GONE);
|
grpError.setVisibility(View.GONE);
|
||||||
tvGmailDraftsHint.setVisibility(View.GONE);
|
tvGmailDraftsHint.setVisibility(View.GONE);
|
||||||
tvOfficeAuthHint.setVisibility(View.GONE);
|
tvOfficeAuthHint.setVisibility(View.GONE);
|
||||||
tvOfficeOutlookHint.setVisibility(View.GONE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,6 @@ public class FragmentSetup extends FragmentBase {
|
||||||
|
|
||||||
int order = 1;
|
int order = 1;
|
||||||
popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_gmail, order++, R.string.title_setup_gmail);
|
popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_gmail, order++, R.string.title_setup_gmail);
|
||||||
popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_outlook, order++, R.string.title_setup_outlook);
|
|
||||||
|
|
||||||
for (EmailProvider provider : EmailProvider.loadProfiles(getContext()))
|
for (EmailProvider provider : EmailProvider.loadProfiles(getContext()))
|
||||||
if (provider.oauth != null &&
|
if (provider.oauth != null &&
|
||||||
|
@ -194,7 +193,6 @@ public class FragmentSetup extends FragmentBase {
|
||||||
.putExtra("name", provider.name)
|
.putExtra("name", provider.name)
|
||||||
.putExtra("askAccount", provider.oauth.askAccount));
|
.putExtra("askAccount", provider.oauth.askAccount));
|
||||||
|
|
||||||
//popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_activesync, order++, R.string.title_setup_activesync);
|
|
||||||
popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_other, order++, R.string.title_setup_other);
|
popupMenu.getMenu().add(Menu.NONE, R.string.title_setup_other, order++, R.string.title_setup_other);
|
||||||
|
|
||||||
SpannableString ss = new SpannableString(getString(R.string.title_setup_pop3));
|
SpannableString ss = new SpannableString(getString(R.string.title_setup_pop3));
|
||||||
|
@ -205,6 +203,7 @@ public class FragmentSetup extends FragmentBase {
|
||||||
@Override
|
@Override
|
||||||
public boolean onMenuItemClick(MenuItem item) {
|
public boolean onMenuItemClick(MenuItem item) {
|
||||||
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(getContext());
|
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(getContext());
|
||||||
|
|
||||||
int itemId = item.getItemId();
|
int itemId = item.getItemId();
|
||||||
if (itemId == R.string.title_setup_gmail) {
|
if (itemId == R.string.title_setup_gmail) {
|
||||||
if (Helper.hasValidFingerprint(getContext()) || BuildConfig.DEBUG)
|
if (Helper.hasValidFingerprint(getContext()) || BuildConfig.DEBUG)
|
||||||
|
@ -212,16 +211,14 @@ public class FragmentSetup extends FragmentBase {
|
||||||
else
|
else
|
||||||
ToastEx.makeText(getContext(), R.string.title_setup_gmail_support, Toast.LENGTH_LONG).show();
|
ToastEx.makeText(getContext(), R.string.title_setup_gmail_support, Toast.LENGTH_LONG).show();
|
||||||
return true;
|
return true;
|
||||||
} else if (itemId == R.string.title_setup_activesync) {
|
} else if (itemId == R.string.title_setup_other) {
|
||||||
Helper.viewFAQ(getContext(), 133);
|
|
||||||
return true;
|
|
||||||
} else if (itemId == R.string.title_setup_outlook || itemId == R.string.title_setup_other) {
|
|
||||||
lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_QUICK_SETUP));
|
lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_QUICK_SETUP));
|
||||||
return true;
|
return true;
|
||||||
} else if (itemId == R.string.title_setup_pop3) {
|
} else if (itemId == R.string.title_setup_pop3) {
|
||||||
lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_QUICK_POP3));
|
lbm.sendBroadcast(new Intent(ActivitySetup.ACTION_QUICK_POP3));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.getIntent() == null)
|
if (item.getIntent() == null)
|
||||||
return false;
|
return false;
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -149,17 +149,6 @@
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvGmailDraftsHint" />
|
app:layout_constraintTop_toBottomOf="@id/tvGmailDraftsHint" />
|
||||||
|
|
||||||
<eu.faircode.email.FixedTextView
|
|
||||||
android:id="@+id/tvOfficeOutlookHint"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="12dp"
|
|
||||||
android:text="@string/title_setup_office_remark"
|
|
||||||
android:textAppearance="@style/TextAppearance.AppCompat.Small"
|
|
||||||
android:textStyle="italic"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvOfficeAuthHint" />
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/btnSupport"
|
android:id="@+id/btnSupport"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
@ -170,7 +159,7 @@
|
||||||
android:textColor="?attr/colorInfoForeground"
|
android:textColor="?attr/colorInfoForeground"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tvOfficeOutlookHint" />
|
app:layout_constraintTop_toBottomOf="@id/tvOfficeAuthHint" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Group
|
<androidx.constraintlayout.widget.Group
|
||||||
android:id="@+id/grpError"
|
android:id="@+id/grpError"
|
||||||
|
|
|
@ -177,18 +177,15 @@
|
||||||
<string name="title_setup_accounts">Accounts</string>
|
<string name="title_setup_accounts">Accounts</string>
|
||||||
<string name="title_setup_identities">Identities</string>
|
<string name="title_setup_identities">Identities</string>
|
||||||
<string name="title_setup_gmail" translatable="false">Gmail (OAuth)</string>
|
<string name="title_setup_gmail" translatable="false">Gmail (OAuth)</string>
|
||||||
<string name="title_setup_outlook" translatable="false">Outlook, Live, Hotmail</string>
|
|
||||||
<string name="title_setup_oauth" translatable="false">%1$s (OAuth)</string>
|
<string name="title_setup_oauth" translatable="false">%1$s (OAuth)</string>
|
||||||
<string name="title_setup_oauth_permission">The email provider has approved OAuth only for official app versions</string>
|
|
||||||
<string name="title_setup_activesync" translatable="false">Exchange ActiveSync</string>
|
|
||||||
<string name="title_setup_other">Other provider</string>
|
<string name="title_setup_other">Other provider</string>
|
||||||
<string name="title_setup_pop3">POP3 account</string>
|
<string name="title_setup_pop3">POP3 account</string>
|
||||||
|
<string name="title_setup_oauth_permission">The email provider has approved OAuth only for official app versions</string>
|
||||||
<string name="title_setup_gmail_support">Authorizing Google accounts will work in official versions only because Android checks the app signature</string>
|
<string name="title_setup_gmail_support">Authorizing Google accounts will work in official versions only because Android checks the app signature</string>
|
||||||
<string name="title_setup_gmail_rationale">Please grant permissions to select an account and read your name</string>
|
<string name="title_setup_gmail_rationale">Please grant permissions to select an account and read your name</string>
|
||||||
<string name="title_setup_gmail_permissions">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.</string>
|
<string name="title_setup_gmail_permissions">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.</string>
|
||||||
<string name="title_setup_gmail_drafts">If the drafts folder is not accessible by IMAP, this can be fixed in the Gmail label settings</string>
|
<string name="title_setup_gmail_drafts">If the drafts folder is not accessible by IMAP, this can be fixed in the Gmail label settings</string>
|
||||||
<string name="title_setup_gmail_password">I want to authorize an account with a password</string>
|
<string name="title_setup_gmail_password">I want to authorize an account with a password</string>
|
||||||
<string name="title_setup_office_remark">Microsoft does not provide this type of authorization for Outlook, Live, Hotmail, etc accounts</string>
|
|
||||||
<string name="title_setup_office_auth">The error \'AUTHENTICATE failed\' can be caused by IMAP/SMTP being disabled by the system administrator</string>
|
<string name="title_setup_office_auth">The error \'AUTHENTICATE failed\' can be caused by IMAP/SMTP being disabled by the system administrator</string>
|
||||||
<string name="title_setup_oauth_rationale">Authorize access to your %1$s account</string>
|
<string name="title_setup_oauth_rationale">Authorize access to your %1$s account</string>
|
||||||
<string name="title_setup_oauth_update">Authorize existing account again</string>
|
<string name="title_setup_oauth_update">Authorize existing account again</string>
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
starttls="true" />
|
starttls="true" />
|
||||||
</provider>
|
</provider>
|
||||||
<provider
|
<provider
|
||||||
name="Office 365/Outlook"
|
name="Outlook/Office 365"
|
||||||
id="office365"
|
id="office365"
|
||||||
link="https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq14"
|
link="https://github.com/M66B/FairEmail/blob/master/FAQ.md#user-content-faq14"
|
||||||
order="5"
|
order="5"
|
||||||
|
|
Loading…
Reference in New Issue