ignore empty lines in debug_emails.txt
This commit is contained in:
		
							parent
							
								
									8cf25de458
								
							
						
					
					
						commit
						29e6285e3c
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -66,7 +66,7 @@ pub struct SimpleEmail { | |||
| 
 | ||||
| impl SimpleEmail { | ||||
|     pub fn new(base: Email, from: &str, to: &str, in_reply_to: Option<String>) -> Self { | ||||
|         let recipients = to.split('\n').map(|s| s.to_string()).collect(); | ||||
|         let recipients = to.split('\n').map(|s| s.trim().to_string()).filter(|s| !s.is_empty()).collect(); | ||||
|         Self { base: base.clone(), from: from.to_string(), to: recipients, in_reply_to } | ||||
|     } | ||||
|     pub fn send_email(&self, subject: String, body: String) -> Result<String, Box<dyn Error>> { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nobody
						nobody