mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-24 02:12:15 -05:00
make it possible to define Providers that don't require
username+password auth
This commit is contained in:
parent
028d07e59d
commit
2aee63e242
@ -205,15 +205,25 @@ public class AccountSetupBasics extends K9Activity
|
||||
null, null);
|
||||
|
||||
String outgoingUsername = mProvider.outgoingUsernameTemplate;
|
||||
outgoingUsername = outgoingUsername.replaceAll("\\$email", email);
|
||||
outgoingUsername = outgoingUsername.replaceAll("\\$user", userEnc);
|
||||
outgoingUsername = outgoingUsername.replaceAll("\\$domain", domain);
|
||||
|
||||
URI outgoingUriTemplate = mProvider.outgoingUriTemplate;
|
||||
outgoingUri = new URI(outgoingUriTemplate.getScheme(), outgoingUsername + ":"
|
||||
+ passwordEnc, outgoingUriTemplate.getHost(), outgoingUriTemplate.getPort(), null,
|
||||
null, null);
|
||||
|
||||
|
||||
if (outgoingUsername != null) {
|
||||
outgoingUsername = outgoingUsername.replaceAll("\\$email", email);
|
||||
outgoingUsername = outgoingUsername.replaceAll("\\$user", userEnc);
|
||||
outgoingUsername = outgoingUsername.replaceAll("\\$domain", domain);
|
||||
outgoingUri = new URI(outgoingUriTemplate.getScheme(), outgoingUsername + ":"
|
||||
+ passwordEnc, outgoingUriTemplate.getHost(), outgoingUriTemplate.getPort(), null,
|
||||
null, null);
|
||||
|
||||
} else {
|
||||
outgoingUri = new URI(outgoingUriTemplate.getScheme(),
|
||||
null, outgoingUriTemplate.getHost(), outgoingUriTemplate.getPort(), null,
|
||||
null, null);
|
||||
|
||||
|
||||
}
|
||||
mAccount = Preferences.getPreferences(this).newAccount();
|
||||
mAccount.setName(getOwnerName());
|
||||
mAccount.setEmail(email);
|
||||
|
Loading…
Reference in New Issue
Block a user