mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 15:06:30 +03:00
use structure as suggested by @dignifiedquire
This commit is contained in:
@@ -2,11 +2,11 @@ use crate::provider::*;
|
||||
use crate::provider::Protocol::*;
|
||||
use crate::provider::Socket::*;
|
||||
use crate::provider::UsernamePattern::*;
|
||||
use std::collections::HashMap;
|
||||
|
||||
lazy_static::lazy_static! {
|
||||
pub static ref PROVIDER_DATA: Vec<Provider> = vec![
|
||||
Provider {
|
||||
domains: "nauta.cu",
|
||||
// nauta.cu
|
||||
static ref P1: Provider = Provider {
|
||||
status: Status::OK,
|
||||
before_login_hint: "",
|
||||
after_login_hint: "",
|
||||
@@ -15,33 +15,45 @@ lazy_static::lazy_static! {
|
||||
Server { protocol: IMAP, socket: STARTTLS, hostname: "imap.nauta.cu", port: 143, username_pattern: EMAIL },
|
||||
Server { protocol: SMTP, socket: STARTTLS, hostname: "smtp.nauta.cu", port: 25, username_pattern: EMAIL },
|
||||
],
|
||||
},
|
||||
Provider {
|
||||
domains: "outlook.com hotmail.com live.com",
|
||||
};
|
||||
|
||||
// outlook.com, hotmail.com, live.com
|
||||
static ref P2: Provider = Provider {
|
||||
status: Status::BROKEN,
|
||||
before_login_hint: "Outlook-e-mail-addresses will not work as expected as these servers remove some important transport information.\n\nHopefully sooner or later there will be a fix; for now, we suggest to use another e-mail-address or try Delta Chat again when the issue is fixed.",
|
||||
after_login_hint: "",
|
||||
overview_page: "https://provider.delta.chat/outlook.com",
|
||||
server: vec![
|
||||
],
|
||||
},
|
||||
Provider {
|
||||
domains: "testrun.org",
|
||||
};
|
||||
|
||||
// testrun.org
|
||||
static ref P3: Provider = Provider {
|
||||
status: Status::OK,
|
||||
before_login_hint: "",
|
||||
after_login_hint: "testrun.org is not Delta Chat :)",
|
||||
overview_page: "",
|
||||
server: vec![
|
||||
],
|
||||
},
|
||||
Provider {
|
||||
domains: "gmail.com googlemail.com",
|
||||
};
|
||||
|
||||
// gmail.com, googlemail.com
|
||||
static ref P4: Provider = Provider {
|
||||
status: Status::PREPARATION,
|
||||
before_login_hint: "For Gmail Accounts, you need to create an App-Password if you have \"2-Step Verification\" enabled. If this setting is not available, you need to enable \"Less secure apps\".",
|
||||
after_login_hint: "",
|
||||
overview_page: "https://provider.delta.chat/gmail.com",
|
||||
server: vec![
|
||||
],
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
pub static ref PROVIDER_DATA: HashMap<&'static str, &'static Provider> = [
|
||||
("nauta.cu", &*P1),
|
||||
("outlook.com", &*P2),
|
||||
("hotmail.com", &*P2),
|
||||
("live.com", &*P2),
|
||||
("testrun.org", &*P3),
|
||||
("gmail.com", &*P4),
|
||||
("googlemail.com", &*P4),
|
||||
].iter().copied().collect();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user