EmailMessage log extension fix
parent
826bee7db6
commit
3a8ddce394
|
@ -9,6 +9,13 @@ namespace Correo.Abstractions.Extensions
|
||||||
=> addresses != null ? string.Join(',', addresses.Select(z => z.Address)) : string.Empty;
|
=> addresses != null ? string.Join(',', addresses.Select(z => z.Address)) : string.Empty;
|
||||||
|
|
||||||
public static string Log(this EmailMessage message)
|
public static string Log(this EmailMessage message)
|
||||||
=> $"Email sent: Subject: {message.Subject}; From: {message.From.Address}; To: {message.To.Log()}; Cc: {message.Cc.Log()}; Bcc: {message.Bcc.Log()};";
|
{
|
||||||
|
var msg = $"Email sent: Subject: {message.Subject}; From: {message.From.Address}; To: {message.To.Log()};";
|
||||||
|
if (message.Cc != null)
|
||||||
|
msg += $" Cc: {message.Cc.Log()};";
|
||||||
|
if (message.Bcc != null)
|
||||||
|
msg += $" Bcc: {message.Bcc.Log()};";
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue