mirror of
https://github.com/M66B/FairEmail.git
synced 2025-12-31 10:01:22 +01:00
Outlook MSAL
This commit is contained in:
@@ -44,6 +44,7 @@ public class MailService implements AutoCloseable {
|
||||
|
||||
static final int AUTH_TYPE_PASSWORD = 1;
|
||||
static final int AUTH_TYPE_GMAIL = 2;
|
||||
static final int AUTH_TYPE_OUTLOOK = 3;
|
||||
|
||||
private final static int CONNECT_TIMEOUT = 20 * 1000; // milliseconds
|
||||
private final static int WRITE_TIMEOUT = 60 * 1000; // milliseconds
|
||||
@@ -178,7 +179,7 @@ public class MailService implements AutoCloseable {
|
||||
|
||||
public String connect(String host, int port, int auth, String user, String password) throws MessagingException {
|
||||
try {
|
||||
if (auth == AUTH_TYPE_GMAIL)
|
||||
if (auth == AUTH_TYPE_GMAIL || auth == AUTH_TYPE_OUTLOOK)
|
||||
properties.put("mail." + protocol + ".auth.mechanisms", "XOAUTH2");
|
||||
|
||||
//if (BuildConfig.DEBUG)
|
||||
|
||||
Reference in New Issue
Block a user