From 9c5f1dbca3b8ab277613df2b069a6c3e74191e27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tristan=20Dani=C3=ABl=20Maat?= Date: Sat, 11 Jul 2020 22:21:30 +0100 Subject: [PATCH] Store mail to /srv/mail We should probably read configuration to determine where mail should go, but for now should suffice. --- src/mail.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mail.rs b/src/mail.rs index 1596a42..d8558e4 100644 --- a/src/mail.rs +++ b/src/mail.rs @@ -22,8 +22,8 @@ fn send_mail(email: &Email) -> Result<(), String> { .build() .map_err(|err| format!("Invalid email contents: {}", err))?; - let mut mailer = FileTransport::new("mails"); - if let Err(error) = create_dir_all("mails") { + let mut mailer = FileTransport::new("/srv/mail"); + if let Err(error) = create_dir_all("/srv/mail") { println!("Could not create mail directory: {}", error); }; mailer.send(email.into()).map_err(|err| {