Hello,
I'm trying to connect an Hotmail mailbox with EWS.
The problem is that I can't connect to Hotmail....
I have try that :
ExchangeService service = new ExchangeService(); ExchangeCredentials credentials = new WebCredentials( username + "@" + domain + ".fr", password, "hotmail.com"); service.setCredentials(credentials); try { service.setTraceListener(new TraceListener()); // service.autodiscoverUrl(username + "@" + domain + ".fr", new ValidateRedirectionUrlCallback()); // service.setUrl(new URI("https://outlook.com/EWS/Exchange.asmx")); service.setUrl(new URI("https://autodiscover.hotmail.com/autodiscover/autodiscover.xml")); // service.autodiscoverUrl(/*"https://autodiscover.hotmail.com/autodiscover/autodiscover.xml"*/username + "@" + domain + ".fr", new ValidateRedirectionUrlCallback()); service.setUseDefaultCredentials(false); service.setPreAuthenticate(true); } catch (Exception e) { initMDC("", new Long(-1), new Long(-1), "ExchangeWSEngine/start"); m_stringBuffer = new StringBuffer("Exception 0 : ").append(LogFormatter.stack2string(e)); LOGGER.info(m_stringBuffer.toString()); }
I have try to make "static" URl, autodiscover URL, with domain or not (in WebCredentials).
Did you see the problem ?
Thank's.