email: HTML templates and multipart messages
Emails now render an HTML template from templates/email with a plaintext fallback, sent as multipart/alternative. A configurable brand name shows in the template. Reset and confirmation mails share one styled base.
This commit is contained in:
parent
fbcf0eaac7
commit
06e9da4dc8
10 changed files with 139 additions and 25 deletions
|
|
@ -21,6 +21,13 @@ pub struct Email {
|
|||
// A shell command the message is piped to on stdin, e.g. "sendmail -t" or
|
||||
// "msmtp -t". Run via `sh -c`, so redirection and pipes work.
|
||||
pub command: String,
|
||||
// Display name shown in email templates (header/footer).
|
||||
#[serde(default = "default_brand")]
|
||||
pub brand: String,
|
||||
}
|
||||
|
||||
fn default_brand() -> String {
|
||||
"Network Services".to_string()
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize, Clone)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue