correct mail address

This commit is contained in:
murmeldin 2024-07-26 17:19:14 +02:00 committed by murmeldin
parent 72bd5ba9cf
commit dc0ff31b52

View file

@ -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<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 { "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