Store mail to /srv/mail
We should probably read configuration to determine where mail should go, but for now should suffice.
This commit is contained in:
parent
bd5604be63
commit
9c5f1dbca3
|
@ -22,8 +22,8 @@ fn send_mail(email: &Email) -> Result<(), String> {
|
||||||
.build()
|
.build()
|
||||||
.map_err(|err| format!("Invalid email contents: {}", err))?;
|
.map_err(|err| format!("Invalid email contents: {}", err))?;
|
||||||
|
|
||||||
let mut mailer = FileTransport::new("mails");
|
let mut mailer = FileTransport::new("/srv/mail");
|
||||||
if let Err(error) = create_dir_all("mails") {
|
if let Err(error) = create_dir_all("/srv/mail") {
|
||||||
println!("Could not create mail directory: {}", error);
|
println!("Could not create mail directory: {}", error);
|
||||||
};
|
};
|
||||||
mailer.send(email.into()).map_err(|err| {
|
mailer.send(email.into()).map_err(|err| {
|
||||||
|
|
Loading…
Reference in a new issue