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
|
|
@ -58,8 +58,8 @@ impl ServiceCtx {
|
|||
}
|
||||
|
||||
// Send an email (the link layer pipes it to the configured mail command).
|
||||
pub fn send_email(&mut self, to: impl Into<String>, subject: impl Into<String>, body: impl Into<String>) {
|
||||
self.actions.push(NetAction::SendEmail { to: to.into(), subject: subject.into(), body: body.into() });
|
||||
pub fn send_email(&mut self, to: impl Into<String>, subject: impl Into<String>, text: impl Into<String>, html: Option<String>) {
|
||||
self.actions.push(NetAction::SendEmail { to: to.into(), subject: subject.into(), text: text.into(), html });
|
||||
}
|
||||
|
||||
// Hand a password change to the engine to finish: its derivation runs off the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue