fix: log EmailService::send_email errors instead of silently discarding
All checks were successful
BotServer CI/CD / build (push) Successful in 4m26s
All checks were successful
BotServer CI/CD / build (push) Successful in 4m26s
This commit is contained in:
parent
dde6ac236e
commit
61ae0cac82
1 changed files with 9 additions and 6 deletions
|
|
@ -350,7 +350,7 @@ async fn execute_send_mail(
|
||||||
|
|
||||||
let email_service = EmailService::new(Arc::new(state.clone()));
|
let email_service = EmailService::new(Arc::new(state.clone()));
|
||||||
|
|
||||||
if email_service
|
match email_service
|
||||||
.send_email(
|
.send_email(
|
||||||
to,
|
to,
|
||||||
subject,
|
subject,
|
||||||
|
|
@ -361,11 +361,14 @@ async fn execute_send_mail(
|
||||||
} else {
|
} else {
|
||||||
Some(attachments.clone())
|
Some(attachments.clone())
|
||||||
},
|
},
|
||||||
)
|
) {
|
||||||
.is_ok()
|
Ok(msg_id) => {
|
||||||
{
|
info!("Email sent successfully: {} to {}", msg_id, to);
|
||||||
trace!("Email sent successfully: {}", message_id);
|
return Ok(format!("Email sent: {}", message_id));
|
||||||
return Ok(format!("Email sent: {}", message_id));
|
}
|
||||||
|
Err(e) => {
|
||||||
|
error!("EmailService::send_email failed: {}", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue