mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-25 07:25:22 -07:00
parent
e08fbb5298
commit
b859ebc517
1 changed files with 9 additions and 2 deletions
|
@ -96,7 +96,14 @@ namespace Ombi.Notifications
|
|||
client.Authenticate(settings.Username, settings.Password);
|
||||
}
|
||||
_log.LogDebug("sending message to {0} \r\n from: {1}\r\n Are we authenticated: {2}", message.To, message.From, client.IsAuthenticated);
|
||||
await client.SendAsync(message);
|
||||
try
|
||||
{
|
||||
await client.SendAsync(message);
|
||||
}
|
||||
catch (MailKit.Net.Smtp.SmtpCommandException e) when (e.Message.Equals(String.Format("5.1.1 Mailbox <{0}> does not exist", model.To)))
|
||||
{
|
||||
_log.LogError("Could not send email '{0}', address <{1}> does not exist.",message.Subject, model.To);
|
||||
}
|
||||
await client.DisconnectAsync(true);
|
||||
}
|
||||
}
|
||||
|
@ -178,4 +185,4 @@ namespace Ombi.Notifications
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue