diff --git a/src/NLog.MailKit/MailTarget.cs b/src/NLog.MailKit/MailTarget.cs index b9ed1a8..a835fc7 100644 --- a/src/NLog.MailKit/MailTarget.cs +++ b/src/NLog.MailKit/MailTarget.cs @@ -590,7 +590,7 @@ private MimeMessage CreateMailMessage(LogEventInfo lastEvent, string body) var encoding = RenderLogEvent(Encoding, lastEvent, DefaultEncoding); msg.Body = new TextPart(html ? TextFormat.Html : TextFormat.Plain) { - Text = newBody, + Text = newBody ?? string.Empty, ContentType = { Charset = encoding?.WebName } }; diff --git a/src/NLog.MailKit/NLog.MailKit.csproj b/src/NLog.MailKit/NLog.MailKit.csproj index b010acd..57371a4 100644 --- a/src/NLog.MailKit/NLog.MailKit.csproj +++ b/src/NLog.MailKit/NLog.MailKit.csproj @@ -28,15 +28,15 @@ If the mail target was already available on your platform, this package will ove NLog.snk false -Changelog: + Changelog: -- SmtpAuthenticationMode.OAuth2 with SmtpUserName (OAuth UserName) and SmtpPassword (OAuth AccessToken) -- Updated NLog v6.0.5 + - Update MailKit to v4.15.1 + - Update NLog to v6.1.1 -See https://github.com/NLog/NLog.MailKit/releases - - - 6.0.5 + See https://github.com/NLog/NLog.MailKit/releases + + + 6.1.1 6.0.0.0 $(VersionPrefix).0 README.md @@ -55,11 +55,11 @@ See https://github.com/NLog/NLog.MailKit/releases 9.0 - + - +