1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-13 03:02:22 -05:00

Fix : avoid duplicate entries on email detection (Authentication failure with Exchange 2007)

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@264 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2008-12-28 21:48:33 +00:00
parent 36a84845e5
commit c248bb4acf

View File

@ -1127,7 +1127,12 @@ public class ExchangeSession {
if (status != HttpStatus.SC_OK) {
throw new IOException("Unable to get user email from: " + getMethod.getPath());
}
email = XMLStreamUtil.getElementContentByLocalName(getMethod.getResponseBodyAsStream(), "EM");
Map<String, Map<String, String>> results = XMLStreamUtil.getElementContentsAsMap(getMethod.getResponseBodyAsStream(), "item", "AN");
Map<String, String> result = results.get(userName);
if (result != null) {
email = result.get("EM");
}
} finally {
getMethod.releaseConnection();
}