diff --git a/src/java/davmail/Settings.java b/src/java/davmail/Settings.java index 358b66a9..7adf1ed3 100644 --- a/src/java/davmail/Settings.java +++ b/src/java/davmail/Settings.java @@ -43,6 +43,9 @@ public final class Settings { public static final String OUTLOOK_URL = "https://outlook.office365.com"; public static final String O365_URL = OUTLOOK_URL+"/EWS/Exchange.asmx"; + + public static final String GRAPH_URL = "https://graph.microsoft.com"; + public static final String O365_LOGIN_URL = "https://login.microsoftonline.com/"; public static final String O365 = "O365"; @@ -742,7 +745,10 @@ public static String getUserAgent() { public static String getO365Url() { String tld = getProperty("davmail.tld"); - if (tld == null) { + String outlookUrl = getProperty("davmail.outlookUrl"); + if (outlookUrl != null) { + return outlookUrl; + } else if (tld == null) { return O365_URL; } else { return "https://outlook.office365."+tld+"/EWS/Exchange.asmx"; @@ -751,7 +757,10 @@ public static String getO365Url() { public static String getO365LoginUrl() { String tld = getProperty("davmail.tld"); - if (tld == null) { + String loginUrl = getProperty("davmail.loginUrl"); + if (loginUrl != null) { + return loginUrl; + } else if (tld == null) { return O365_LOGIN_URL; } else { return "https://login.microsoftonline."+tld+"/";