diff --git a/src/main.rs b/src/main.rs index b87176a..9b6d8b2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,10 +45,16 @@ use lettre::message::header::MessageId; use lettre::transport::smtp::authentication::Credentials; // MAIL END +enum EMailOperationStates { + Test, + ProductionToIntern +} + const HEDGEDOC_SERVER_URL: &str = variables_and_settings::HEDGEDOC_SERVER_URL; const PLENUM_TEMPLATE_URL: &str = variables_and_settings::PLENUM_TEMPLATE_URL; const FALLBACK_TEMPLATE: &str = variables_and_settings::FALLBACK_TEMPLATE; -const TESTING_MODE: bool = false; +const TESTING_MODE: EMailOperationStates = EMailOperationStates::Test; + fn kv_defaults (kv: &KV) { @@ -248,7 +254,7 @@ fn mail_versenden(inhalt: String, betreff: String) -> std::result::Result"} else {"CCCB Intern "}; + let mail_to: &str = if TESTING_MODE = EMailOperationStates::Test { "Marek Krug "} else {"CCCB Intern "}; let email = Message::builder() // Set the sender's name and email address