diff --git a/IRaCIS.Core.Application/Helper/Email/SendEmailHelper.cs b/IRaCIS.Core.Application/Helper/Email/SendEmailHelper.cs index 3179c16e1..04c2112c4 100644 --- a/IRaCIS.Core.Application/Helper/Email/SendEmailHelper.cs +++ b/IRaCIS.Core.Application/Helper/Email/SendEmailHelper.cs @@ -11,6 +11,12 @@ public static class SendEmailHelper public static async Task SendEmailAsync(MimeMessage messageToSend, SystemEmailSendConfig _systemEmailConfig, EventHandler? messageSentSuccess = null) { + //没有收件人 那么不发送 + if (messageToSend.To.Count == 0) + { + return; + } + try { using (var smtp = new MailKit.Net.Smtp.SmtpClient())