1
0
mirror of https://github.com/moparisthebest/davmail synced 2025-02-28 09:21:49 -05:00

Improve getAliasFromOptions to retrieve alias with custom dn

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@979 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2010-03-30 22:13:39 +00:00
parent cc23ec78ab
commit 56cbeda23b

View File

@ -2994,7 +2994,7 @@ public class ExchangeSession {
}
}
static final String MAILBOX_BASE = "cn=recipients/cn=";
static final String MAILBOX_BASE = "/cn=";
protected String getAliasFromOptions(String path) {
String result = null;
@ -3010,7 +3010,7 @@ public class ExchangeSession {
while ((line = optionsPageReader.readLine()) != null && line.toLowerCase().indexOf(MAILBOX_BASE) == -1) {
}
if (line != null) {
int start = line.toLowerCase().indexOf(MAILBOX_BASE) + MAILBOX_BASE.length();
int start = line.toLowerCase().lastIndexOf(MAILBOX_BASE) + MAILBOX_BASE.length();
int end = line.indexOf('<', start);
result = line.substring(start, end);
}