Compare commits

..

No commits in common. "123efa1c8c7a439cd787bbf9aed68b8a155cb5a1" and "ded9ed984beedbd41e9b35d264c49fcec368bce7" have entirely different histories.

View File

@ -8,7 +8,7 @@ use sqlx::SqlitePool;
use crate::tera::admin::mail::MailToSend; use crate::tera::admin::mail::MailToSend;
use super::{family::Family, log::Log, role::Role, user::User}; use super::{family::Family, role::Role, user::User};
pub struct Mail {} pub struct Mail {}
@ -32,16 +32,7 @@ impl Mail {
for rec in role.mails_from_role(db).await { for rec in role.mails_from_role(db).await {
let splitted = rec.split(','); let splitted = rec.split(',');
for single_rec in splitted { for single_rec in splitted {
match single_rec.parse() { email = email.bcc(single_rec.parse().unwrap());
Ok(new_bcc_mail) => email = email.bcc(new_bcc_mail),
Err(_) => {
Log::create(
db,
format!("Mail not sent to {rec}, because it could not be parsed"),
)
.await;
}
}
} }
} }