Closed jamesSampica closed 6 months ago
@shoe788 this seems to work for me NetworkCredentials = new System.Net.NetworkCredential()
Hi, The solution provided by @jkiebzak (Thank you!) works for me, but I guess that it should be an additional parameter that will allow specifying the SmtpClient.UseDefaultCredentials option via App settings. Because with this solution I should use the code to initialize the sink.
Is there a way to set anonymous credentials for the smtp client? When no network credentials are specified default credentials get used as per lines 147-148 on https://github.com/serilog/serilog-sinks-email/blob/dev/src/Serilog.Sinks.Email/Sinks/Email/EmailSink.cs