set up smtp #4 + write email feature #8

This commit is contained in:
Clément DOUIN
2021-01-03 23:18:23 +01:00
parent 0a48df0567
commit 125c4e2b0e
6 changed files with 426 additions and 6 deletions
+6
View File
@@ -39,6 +39,12 @@ pub struct Config {
pub smtp: ServerInfo,
}
impl Config {
pub fn email_full(&self) -> String {
format!("{} <{}>", self.name, self.email)
}
}
pub fn from_xdg() -> Option<PathBuf> {
match env::var("XDG_CONFIG_HOME") {
Err(_) => None,