mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-04 08:35:08 -05:00
Set the IMAP namespace for Gmail during auto-configuration.
This commit is contained in:
parent
44cc1930d5
commit
58d20a501a
@ -193,9 +193,16 @@ public class AccountSetupBasics extends K9Activity
|
|||||||
incomingUsername = incomingUsername.replaceAll("\\$domain", domain);
|
incomingUsername = incomingUsername.replaceAll("\\$domain", domain);
|
||||||
|
|
||||||
URI incomingUriTemplate = mProvider.incomingUriTemplate;
|
URI incomingUriTemplate = mProvider.incomingUriTemplate;
|
||||||
|
|
||||||
|
String namespace = null;
|
||||||
|
// Gmail uses a special namespace, otherwise everything ends up in the "[Imap]" namespace.
|
||||||
|
if(incomingUriTemplate.getHost().toLowerCase().endsWith("gmail.com")) {
|
||||||
|
namespace = "/[Gmail]";
|
||||||
|
}
|
||||||
|
|
||||||
incomingUri = new URI(incomingUriTemplate.getScheme(), incomingUsername + ":"
|
incomingUri = new URI(incomingUriTemplate.getScheme(), incomingUsername + ":"
|
||||||
+ passwordEnc, incomingUriTemplate.getHost(), incomingUriTemplate.getPort(), null,
|
+ passwordEnc, incomingUriTemplate.getHost(), incomingUriTemplate.getPort(),
|
||||||
null, null);
|
namespace, null, null);
|
||||||
|
|
||||||
String outgoingUsername = mProvider.outgoingUsernameTemplate;
|
String outgoingUsername = mProvider.outgoingUsernameTemplate;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user