ModelExtensions fix

master
Tudor Stanciu 2023-01-19 20:05:17 +02:00
parent 1d5c8c6315
commit d623c9c7a4
2 changed files with 6 additions and 0 deletions

View File

@ -11,6 +11,9 @@ namespace Correo.MailKit.Extensions
private static void AddRange(this InternetAddressList list, IEnumerable<EmailMessage.MailAddress> addresses)
{
if (addresses == null)
return;
foreach (var item in addresses)
list.Add(item.ToMailboxAddress());
}

View File

@ -11,6 +11,9 @@ namespace Correo.SmtpClient.Extensions
private static void AddRange(this MailAddressCollection collection, IEnumerable<EmailMessage.MailAddress> addresses)
{
if (addresses == null)
return;
foreach (var item in addresses)
collection.Add(item.ToMailAddress());
}