correct mail address
This commit is contained in:
parent
72bd5ba9cf
commit
dc0ff31b52
10
src/main.rs
10
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<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
|
||||
|
|
Loading…
Reference in a new issue