Store mail to /srv/mail

We should probably read configuration to determine where mail should
go, but for now should suffice.
pull/1/head
Tristan Daniël Maat 2020-07-11 22:21:30 +01:00
parent bd5604be63
commit 9c5f1dbca3
Signed by: tlater
GPG Key ID: 49670FD774E43268
1 changed files with 2 additions and 2 deletions

View File

@ -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| {