mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-24 23:12:55 +00:00
Always prefer built-in profiles
This commit is contained in:
parent
4b585c3567
commit
c142c44055
1 changed files with 14 additions and 0 deletions
|
@ -151,6 +151,20 @@ public class EmailProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
static EmailProvider fromDomain(Context context, String domain) throws IOException {
|
static EmailProvider fromDomain(Context context, String domain) throws IOException {
|
||||||
|
EmailProvider autoconfig = fromDomainInternal(context, domain);
|
||||||
|
|
||||||
|
List<EmailProvider> providers = loadProfiles(context);
|
||||||
|
for (EmailProvider provider : providers)
|
||||||
|
if (provider.imap_host.equals(autoconfig.imap_host) ||
|
||||||
|
provider.smtp_host.equals(autoconfig.smtp_host)) {
|
||||||
|
Log.i("Replacing autoconfig by profile " + provider.name);
|
||||||
|
return provider;
|
||||||
|
}
|
||||||
|
|
||||||
|
return autoconfig;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static EmailProvider fromDomainInternal(Context context, String domain) throws IOException {
|
||||||
try {
|
try {
|
||||||
Log.i("Provider from DNS domain=" + domain);
|
Log.i("Provider from DNS domain=" + domain);
|
||||||
return addSpecials(context, fromDNS(domain));
|
return addSpecials(context, fromDNS(domain));
|
||||||
|
|
Loading…
Reference in a new issue