NLog Mail Target for sending email using .NET SmtpClient for each logevent. Can also be combined with BufferingWrapper to group multiple logevents into a single email. Can also be combined with LimitingWrapper to throttle the number of emails. Can also be combined with FilteringWrapper to avoid repeating identical emails.
If having trouble with output, then check NLog InternalLogger for clues. See also Troubleshooting NLog
See the NLog Wiki for available options and examples.
NLog will only recognize type-alias Mail when loading from NLog.config-file, if having added extension to NLog.config-file:
<extensions>
<add assembly="NLog.Targets.Mail"/>
</extensions>Alternative register from code using fluent configuration API:
LogManager.Setup().SetupExtensions(ext => {
ext.RegisterTarget<NLog.Targets.MailTarget>();
});