mirror of https://github.com/M66B/FairEmail.git
Fixed/improved email provider
This commit is contained in:
parent
6b03106bc3
commit
98885428e8
|
@ -215,7 +215,7 @@ public class EmailProvider {
|
||||||
// https://wiki.mozilla.org/Thunderbird:Autoconfiguration
|
// https://wiki.mozilla.org/Thunderbird:Autoconfiguration
|
||||||
HttpURLConnection request;
|
HttpURLConnection request;
|
||||||
try {
|
try {
|
||||||
URL url = new URL(" https://autoconfig." + domain + "/mail/config-v1.1.xml?emailaddress=someone@" + domain);
|
URL url = new URL("https://autoconfig." + domain + "/mail/config-v1.1.xml?emailaddress=someone@" + domain);
|
||||||
Log.i("Fetching " + url);
|
Log.i("Fetching " + url);
|
||||||
|
|
||||||
request = (HttpURLConnection) url.openConnection();
|
request = (HttpURLConnection) url.openConnection();
|
||||||
|
@ -252,6 +252,7 @@ public class EmailProvider {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
// https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser
|
// https://developer.android.com/reference/org/xmlpull/v1/XmlPullParser
|
||||||
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
|
XmlPullParserFactory factory = XmlPullParserFactory.newInstance();
|
||||||
XmlPullParser xml = factory.newPullParser();
|
XmlPullParser xml = factory.newPullParser();
|
||||||
|
@ -407,8 +408,9 @@ public class EmailProvider {
|
||||||
|
|
||||||
eventType = xml.next();
|
eventType = xml.next();
|
||||||
}
|
}
|
||||||
|
} finally {
|
||||||
request.disconnect();
|
request.disconnect();
|
||||||
|
}
|
||||||
|
|
||||||
Log.i("imap=" + provider.imap.host + ":" + provider.imap.port + ":" + provider.imap.starttls);
|
Log.i("imap=" + provider.imap.host + ":" + provider.imap.port + ":" + provider.imap.starttls);
|
||||||
Log.i("smtp=" + provider.smtp.host + ":" + provider.smtp.port + ":" + provider.smtp.starttls);
|
Log.i("smtp=" + provider.smtp.host + ":" + provider.smtp.port + ":" + provider.smtp.starttls);
|
||||||
|
|
Loading…
Reference in New Issue