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
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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| {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue