mirror of
https://github.com/M66B/FairEmail.git
synced 2025-02-21 21:57:19 +00:00
Added text
This commit is contained in:
parent
33235e74f7
commit
dd26997b6b
2 changed files with 9 additions and 5 deletions
|
@ -129,11 +129,11 @@ public class Provider {
|
|||
|
||||
static Provider fromDomain(Context context, String domain) throws IOException {
|
||||
try {
|
||||
return Provider.fromISPDB(domain);
|
||||
return Provider.fromISPDB(context, domain);
|
||||
} catch (Throwable ex) {
|
||||
Log.w(ex);
|
||||
try {
|
||||
return Provider.fromDNS(domain);
|
||||
return Provider.fromDNS(context, domain);
|
||||
} catch (UnknownHostException ex1) {
|
||||
Log.w(ex1);
|
||||
throw new UnknownHostException(context.getString(R.string.title_setup_no_settings, domain));
|
||||
|
@ -141,11 +141,14 @@ public class Provider {
|
|||
}
|
||||
}
|
||||
|
||||
private static Provider fromISPDB(String domain) throws IOException, XmlPullParserException {
|
||||
private static Provider fromISPDB(Context context, String domain) throws IOException, XmlPullParserException {
|
||||
Provider provider = new Provider(domain);
|
||||
if ("gmail.com".equals(domain)) {
|
||||
provider.documentation = new StringBuilder();
|
||||
provider.documentation.append("<a href=\"https://www.google.com/settings/security/lesssecureapps\">Enable access for \"less secure\" apps</a>");
|
||||
provider.documentation
|
||||
.append("<a href=\"https://www.google.com/settings/security/lesssecureapps\">")
|
||||
.append(context.getString(R.string.title_setup_setting_gmail))
|
||||
.append("</a>");
|
||||
}
|
||||
|
||||
// https://wiki.mozilla.org/Thunderbird:Autoconfiguration:ConfigFileFormat
|
||||
|
@ -320,7 +323,7 @@ public class Provider {
|
|||
return provider;
|
||||
}
|
||||
|
||||
private static Provider fromDNS(String domain) throws TextParseException, UnknownHostException {
|
||||
private static Provider fromDNS(Context context, String domain) throws TextParseException, UnknownHostException {
|
||||
// https://tools.ietf.org/html/rfc6186
|
||||
SRVRecord imap = lookup("_imaps._tcp." + domain);
|
||||
SRVRecord smtp = lookup("_submission._tcp." + domain);
|
||||
|
|
|
@ -87,6 +87,7 @@
|
|||
<string name="title_setup_imported">Settings imported</string>
|
||||
<string name="title_setup_quick">Quick config</string>
|
||||
<string name="title_setup_quick_remark">Quick config can be used for most major providers</string>
|
||||
<string name="title_setup_setting_gmail">Enable access for "less secure" apps</string>
|
||||
<string name="title_setup_no_settings">No settings found for \'%1$s\'</string>
|
||||
<string name="title_setup_quick_success">An account and an identity have been added. You can review the details below using the \'manage\' buttons.</string>
|
||||
<string name="title_setup_quick_failed">You can try to configure an account and an identity below too</string>
|
||||
|
|
Loading…
Reference in a new issue