diff --git a/src/NLog.MailKit/MailTarget.cs b/src/NLog.MailKit/MailTarget.cs index 4db2b4f..27659eb 100644 --- a/src/NLog.MailKit/MailTarget.cs +++ b/src/NLog.MailKit/MailTarget.cs @@ -253,6 +253,8 @@ protected override void Write(AsyncLogEventInfo logEvent) Write((IList)new[] { logEvent }); } +#if !NETSTANDARD2_0 + /// /// NOTE! Will soon be marked obsolete. Instead override Write(IList{AsyncLogEventInfo} logEvents) /// @@ -266,6 +268,8 @@ protected override void Write(AsyncLogEventInfo[] logEvents) Write((IList)logEvents); } +#endif + /// /// Renders an array logging events. /// diff --git a/src/NLog.MailKit/NLog.MailKit.csproj b/src/NLog.MailKit/NLog.MailKit.csproj index 2815b6c..2f87757 100644 --- a/src/NLog.MailKit/NLog.MailKit.csproj +++ b/src/NLog.MailKit/NLog.MailKit.csproj @@ -1,21 +1,20 @@  - netstandard1.4 - 1.1.1 + netstandard1.4;net40;netstandard2.0 + 2.0 Julian Verdurmen NLog - - NLog Mail Target for .NET Core, using MailKit. + NLog Mail Target for .NET Core, using MailKit. - As System.Net.Mail isn't ported to .NET Core (yet), the original Mail Target of NLog isn't working when using .NET Core. +As System.Net.Mail isn't ported to .NET Core (yet), the original Mail Target of NLog isn't working when using .NET Core. - This package add the mail target to NLog and has the same options as the original Mail Target. +This package add the mail target to NLog and has the same options as the original Mail Target. - Compared to the original MailTarget, the following options aren't implemented: +Compared to the original MailTarget, the following options aren't implemented: - - PickupDirectory - - NTLM auth - + - PickupDirectory + - NTLM auth + https://github.com/NLog/NLog.MailKit https://raw.githubusercontent.com/NLog/NLog.MailKit/master/LICENSE http://nlog-project.org/N.png @@ -26,21 +25,33 @@ NLog.snk False - 1.1.1: Updated dependencies - 1.1.0: Added SkipCertificateValidation option - - 1.0.0.0 +2.0: .NET 4+ and .NET standard 2 support. + +Small breaking change, SmtpAuthenticationMode has been moved to this dll. + +1.1.1: Updated dependencies +1.1.0: Added SkipCertificateValidation option + + 2.0.0.0 - 0.1.0.0 + 2.0.0.0 - bin\Release\netstandard1.3\NLog.MailKit.xml + bin\Release\$(TargetFramework)\NLog.MailKit.xml bin\Release\ - TRACE;RELEASE + RELEASE - - + + + + + + + + + + diff --git a/src/NLog.MailKit/SmtpAuthenticationMode.cs b/src/NLog.MailKit/SmtpAuthenticationMode.cs new file mode 100644 index 0000000..c2e6a36 --- /dev/null +++ b/src/NLog.MailKit/SmtpAuthenticationMode.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace NLog.MailKit +{ + /// + /// SMTP authentication modes. + /// + public enum SmtpAuthenticationMode + { + /// + /// No authentication. + /// + None, + + /// + /// Basic - username and password. + /// + Basic, + + /// + /// NTLM Authentication. + /// + Ntlm, + } +} diff --git a/test/NLog.MailKit.Tests/NLog.MailKit.Tests.csproj b/test/NLog.MailKit.Tests/NLog.MailKit.Tests.csproj index 386e412..12ff5f2 100644 --- a/test/NLog.MailKit.Tests/NLog.MailKit.Tests.csproj +++ b/test/NLog.MailKit.Tests/NLog.MailKit.Tests.csproj @@ -1,14 +1,14 @@  - netcoreapp1.1 + netcoreapp1.1;net461;netcoreapp2.0 - + - - + +