mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-25 07:25:22 -07:00
Update GenericEmailProvider.cs
Add the two checks in when inside catch.
This commit is contained in:
parent
102d6ea139
commit
9a4386e28e
1 changed files with 2 additions and 9 deletions
|
@ -100,16 +100,9 @@ namespace Ombi.Notifications
|
|||
{
|
||||
await client.SendAsync(message);
|
||||
}
|
||||
catch (MailKit.Net.Smtp.SmtpCommandException e) when (e.ErrorCode.Equals(MailKit.Net.Smtp.SmtpErrorCode.RecipientNotAccepted))
|
||||
catch (MailKit.Net.Smtp.SmtpCommandException e) when (e.ErrorCode.Equals(MailKit.Net.Smtp.SmtpErrorCode.RecipientNotAccepted) && e.StatusCode.Equals(MailKit.Net.Smtp.SmtpStatusCode.MailboxUnavailable))
|
||||
{
|
||||
if (e.StatusCode.Equals(MailKit.Net.Smtp.SmtpStatusCode.MailboxUnavailable))
|
||||
{
|
||||
_log.LogError("Could not send email '{0}', address <{1}> does not exist.", message.Subject, model.To);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
_log.LogError("Could not send email '{0}', address <{1}> does not exist.", message.Subject, model.To);
|
||||
}
|
||||
await client.DisconnectAsync(true);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue