Sends log events by SMTP email.
Package - Serilog.Sinks.Email
var log = new LoggerConfiguration()
.WriteTo.Email(
fromEmail: "[email protected]",
toEmail: "[email protected]",
mailServer: "smtp.example.com")
.CreateLogger();
An overload accepting EmailConnectionInfo
can be used to specify advanced options.