我尝试使用xml设置此接收器Serilog.Sinks.Email
<add key="serilog:write-to:Email.restrictedToMinimumLevel" value="Warning" />
<add key="serilog:write-to:Email.from" value="email-from" />
<add key="serilog:write-to:Email.to" value="email-to" />
<add key="serilog:write-to:Email.mailServer" value="mail-server" />
<add key="serilog:write-to:Email.outputTemplate" value="tmpl" />
<add key="serilog:write-to:Email.networkCredential" value="???" />
由于networkCredential实现了ICredentialsByHost,是否可以使用xml指定它?
答案 0 :(得分:0)
这是电子邮件接收器配置和/或appsettings支持的限制。