mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-22 06:01:12 +00:00
Simplification
This commit is contained in:
parent
266959ece8
commit
3cfbb08797
1 changed files with 2 additions and 9 deletions
|
@ -230,20 +230,13 @@ public class EmailProvider {
|
|||
Record[] records = lookupDNS(context, domain, Type.MX);
|
||||
for (Record record : records) {
|
||||
String target = ((MXRecord) record).getTarget().toString(true);
|
||||
while (!TextUtils.isEmpty(target)) {
|
||||
while (target != null && target.indexOf('.') > 0) {
|
||||
try {
|
||||
return _fromISPDB(context, target, email);
|
||||
} catch (Throwable ex1) {
|
||||
Log.w(ex1);
|
||||
|
||||
int dot = target.indexOf('.');
|
||||
if (dot < 0)
|
||||
target = null;
|
||||
else {
|
||||
target = target.substring(dot + 1);
|
||||
if (target.indexOf('.') < 0)
|
||||
target = null;
|
||||
}
|
||||
target = target.substring(dot + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue