fix enum bugs
This commit is contained in:
		
							parent
							
								
									dc0ff31b52
								
							
						
					
					
						commit
						08878169bc
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -45,6 +45,7 @@ use lettre::message::header::MessageId; | |||
| use lettre::transport::smtp::authentication::Credentials; | ||||
| // MAIL END
 | ||||
| 
 | ||||
| #[derive(PartialEq)] | ||||
| enum EMailOperationStates { | ||||
|     Test, | ||||
|     ProductionToIntern | ||||
|  | @ -254,7 +255,7 @@ fn mail_versenden(inhalt: String, betreff: String) -> std::result::Result<String | |||
|     // Define the email
 | ||||
|     let message_id: String = Uuid::new_v4().to_string() + &String::from("@berlin.ccc.de"); | ||||
| 
 | ||||
|     let mail_to: &str = if TESTING_MODE = EMailOperationStates::Test { "Marek Krug <mail@marekkrug.de>"} else {"CCCB Intern <intern@berlin.ccc.de>"}; | ||||
|     let mail_to: &str = if TESTING_MODE == EMailOperationStates::Test { "Marek Krug <mail@marekkrug.de>"} else {"CCCB Intern <intern@berlin.ccc.de>"}; | ||||
|     
 | ||||
|     let email = Message::builder() | ||||
|         // Set the sender's name and email address
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 nobody
						nobody