Skip to content
📬 Alternative Mail target for NLog using MailKit
Branch: master
Clone or download
dependabot-preview and 304NotModified Bump NLog from 4.6.5 to 4.6.6 (#56)
Bumps [NLog]( from 4.6.5 to 4.6.6.
- [Release notes](
- [Changelog](
- [Commits](NLog/NLog@v4.6.5...v4.6.6)

Signed-off-by: dependabot-preview[bot] <>
Latest commit 9d34091 Jul 16, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Bump NLog from 4.6.5 to 4.6.6 (#56) Jul 16, 2019
test/NLog.MailKit.Tests Bump Microsoft.NET.Test.Sdk from 16.1.1 to 16.2.0 (#55) Jul 16, 2019
.gitattributes first version Apr 29, 2017
LICENSE Initial commit Apr 29, 2017 Update Apr 8, 2019
appveyor.yml patch File version on Appveyor May 31, 2017
patchFileVersion.ps1 patch File version on Appveyor May 31, 2017


Build status NuGet

Alternative Mail target for NLog using MailKit. Compatible with .NET standard 1, .NET standard 2 and .NET 4+

Including this package will replace the original mail target and has the same options as the original mail target, see docs of the original mailTarget

Notice that the original SmtpClient of .NET is obsolete in favor of MailKit:


Currently not implemented:

  • PickupDirectory
  • NTLM auth
  • reading SMTP section from web.config

This library is integration tested with the SmtpServer NuGet package

How to use

  1. Install the package:

    Install-Package NLog.MailKit or in your csproj:

    <PackageReference Include="NLog.MailKit" Version="3.0.1" />
  2. Add to your nlog.config:

        <add assembly="NLog.MailKit"/>

Use the target "mail" and config options can be found here:

Use skipCertificateValidation="true" for prevent AuthenticationException if your remote certificate for smtpServer is invalid - not recommend!


BSD. License of MailKit is MIT

You can’t perform that action at this time.