Skip to content

Commit

Permalink
Do not fail if one email is not sent
Browse files Browse the repository at this point in the history
  • Loading branch information
PolpOnline committed Jan 7, 2025
1 parent 519f66d commit 72a2ff9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/backend/src/workers/email_worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ impl Worker<()> for EmailWorker {
});

for email in emails {
self.smtp_client.send(email).await.map_err(|e| {
error!("Scheduled task: Error sending email: {}", e);
GenericError::from(e)
})?;
match self.smtp_client.send(email).await {
Ok(_) => {}
Err(e) => error!("Scheduled task: Error sending email: {}", e),
}
}

let down_ids = down_services
Expand Down

0 comments on commit 72a2ff9

Please sign in to comment.