email: optional logo image in the header

A configurable logo URL renders as an image beside the brand name in the
email header (falling back to the brand text when unset). Email clients
need a hosted image, so it takes a URL rather than an inline asset.
This commit is contained in:
Jean Chevronnet 2026-07-12 16:36:06 +00:00
parent 98630c7d36
commit bdcce01f11
No known key found for this signature in database
7 changed files with 41 additions and 9 deletions

View file

@ -19,7 +19,7 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db:
return;
};
let code = db.issue_code(&canonical, CodeKind::Reset);
let mail = crate::email::reset(db.email_brand(), db.email_accent(), &canonical, &code);
let mail = crate::email::reset(db.email_brand(), db.email_accent(), db.email_logo(), &canonical, &code);
ctx.send_email(email, mail.subject, mail.text, Some(mail.html));
ctx.notice(me, from.uid, format!("A reset code has been emailed to the address on file for \x02{canonical}\x02."));
}