2020-12-24 16:24:04 +01:00
|
|
|
#[derive(serde::Serialize, serde::Deserialize)]
|
|
|
|
pub struct Configuration {
|
|
|
|
pub concurrency: usize,
|
|
|
|
pub user: String,
|
|
|
|
pub pass: String,
|
|
|
|
pub host: String,
|
|
|
|
pub from: String,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Default for Configuration {
|
|
|
|
fn default() -> Self {
|
|
|
|
Self {
|
|
|
|
concurrency: 2,
|
|
|
|
user: "apikey".to_string(),
|
|
|
|
pass: "YOUR-TOKEN".to_string(),
|
|
|
|
host: "smtp.sendgrid.net".to_string(),
|
|
|
|
from: "contact@jirs.pl".to_string(),
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Configuration {
|
2021-01-06 18:47:54 +01:00
|
|
|
crate::rw!("mail.toml");
|
2020-12-24 16:24:04 +01:00
|
|
|
}
|
2021-01-06 18:47:54 +01:00
|
|
|
crate::read!(Configuration);
|