mirror of
https://github.com/moparisthebest/davmail
synced 2024-08-13 16:53:51 -04:00
EWS: additional failover mail build on logon form failure
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@1589 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
8273e30bbc
commit
3ae327f70f
@ -158,6 +158,16 @@ public class EwsExchangeSession extends ExchangeSession {
|
||||
// userName is email address
|
||||
email = userName;
|
||||
alias = userName.substring(0, userName.indexOf('@'));
|
||||
} else {
|
||||
// userName or domain\username, rebuild email address
|
||||
alias = getAliasFromLogin();
|
||||
String domain = httpClient.getHostConfiguration().getHost();
|
||||
int start = domain.lastIndexOf('.', domain.lastIndexOf('.') - 1);
|
||||
if (start >= 0) {
|
||||
email = alias + '@' + domain.substring(start + 1);
|
||||
} else {
|
||||
email = alias + '@' + domain;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user