0
0
Fork 0
mirror of https://git.verdigado.com/NB-Public/simple-wkd.git synced 2024-12-06 14:52:41 +01:00

Improve mailing and logging

This commit is contained in:
Delta1925 2023-04-15 16:40:42 +02:00
parent f4cec274bf
commit 6a090414fe
No known key found for this signature in database
GPG key ID: 1C21ACE44193CB25
7 changed files with 36 additions and 8 deletions

View file

@ -104,7 +104,7 @@ pub fn confirm_action(token: &str) -> Result<(Action, String), Error> {
pub fn send_confirmation_email(address: &str, action: &Action, token: &str) -> Result<(), Error> {
debug!("Sending email to {}", address);
let template = fs::read_to_string(Path::new("static").join("mail-template.html")).unwrap();
let template = fs::read_to_string(Path::new("assets").join("mail-template.html")).unwrap();
let email = Message::builder()
.from(match SETTINGS.mail_settings.mail_from.parse() {
Ok(mailbox) => mailbox,