Compare commits

..

3 Commits

Author SHA1 Message Date
7c7163f541 Merge pull request 'staging' (#174) from staging into main
Some checks failed
CI/CD Pipeline / test (push) Failing after 2m3s
CI/CD Pipeline / deploy-staging (push) Has been skipped
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #174
2024-01-21 16:01:22 +01:00
f4cb051b84 fix mail error
Some checks failed
CI/CD Pipeline / test (push) Has started running
CI/CD Pipeline / deploy-staging (push) Has been cancelled
CI/CD Pipeline / deploy-main (push) Has been cancelled
2024-01-21 16:00:41 +01:00
2032b7e0db Merge pull request 'main' (#173) from main into staging
All checks were successful
CI/CD Pipeline / test (push) Successful in 8m26s
CI/CD Pipeline / deploy-staging (push) Successful in 4m2s
CI/CD Pipeline / deploy-main (push) Has been skipped
Reviewed-on: #173
2024-01-19 11:58:41 +01:00

View File

@ -128,26 +128,37 @@ Der Vorstand
.parse()
.unwrap());
let splitted = send_to.split(',');
let send_mail = false;
for single_rec in splitted {
email = email.bcc(single_rec.parse().unwrap());
match single_rec.parse() {
Ok(val) => {
email = email.bcc(val);
send_mail = true;
}
Err(_) => {
println!("Error in mail: {single_rec}");
}
}
}
let email = email
.subject("ASKÖ Ruderverein Donau Linz | Vereinsgebühren")
.header(ContentType::TEXT_PLAIN)
.body(content)
.unwrap();
if send_mail {
let email = email
.subject("ASKÖ Ruderverein Donau Linz | Vereinsgebühren")
.header(ContentType::TEXT_PLAIN)
.body(content)
.unwrap();
let creds =
Credentials::new("no-reply@rudernlinz.at".to_owned(), smtp_pw.clone());
let creds =
Credentials::new("no-reply@rudernlinz.at".to_owned(), smtp_pw.clone());
let mailer = SmtpTransport::relay("mail.your-server.de")
.unwrap()
.credentials(creds)
.build();
let mailer = SmtpTransport::relay("mail.your-server.de")
.unwrap()
.credentials(creds)
.build();
// Send the email
mailer.send(&email).unwrap();
// Send the email
mailer.send(&email).unwrap();
}
}
}
}