mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-26 07:55:10 -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);
|
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);
|
||||||
{
|
|
||||||
_log.LogError("Could not send email '{0}', address <{1}> does not exist.", message.Subject, model.To);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
await client.DisconnectAsync(true);
|
await client.DisconnectAsync(true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue