From dc0ff31b5222933ab3d8d81e5beb6a2c1f04b409 Mon Sep 17 00:00:00 2001 From: murmeldin Date: Fri, 26 Jul 2024 17:19:14 +0200 Subject: [PATCH] correct mail address --- src/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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