fix enum bugs
This commit is contained in:
parent
dc0ff31b52
commit
08878169bc
|
@ -45,6 +45,7 @@ use lettre::message::header::MessageId;
|
||||||
use lettre::transport::smtp::authentication::Credentials;
|
use lettre::transport::smtp::authentication::Credentials;
|
||||||
// MAIL END
|
// MAIL END
|
||||||
|
|
||||||
|
#[derive(PartialEq)]
|
||||||
enum EMailOperationStates {
|
enum EMailOperationStates {
|
||||||
Test,
|
Test,
|
||||||
ProductionToIntern
|
ProductionToIntern
|
||||||
|
@ -254,7 +255,7 @@ fn mail_versenden(inhalt: String, betreff: String) -> std::result::Result<String
|
||||||
// Define the email
|
// Define the email
|
||||||
let message_id: String = Uuid::new_v4().to_string() + &String::from("@berlin.ccc.de");
|
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()
|
let email = Message::builder()
|
||||||
// Set the sender's name and email address
|
// Set the sender's name and email address
|
||||||
|
|
Loading…
Reference in a new issue