Open doreille opened 4 months ago
I agree Serilog documentations are lack luster when it comes to appsetting.json.
I am trying to fill "ConnectionSecurity": "StartTls",
and I just get String error, and don't even know what to use instead.
As evidenced by the three week lag and the noise of a "me too" on a duplicate, better to ask this on SO
Perahps this will help .Net Core and Serilog Email sink - JSON Config
The configuration parameters have changed in version 3.0. Prior to version 3.0, SMTP credentials were configured using the userName and password attributes. From version 3.0 onwards, the SMTP credentials are configured using the credentials attribute which has the ICredentialsByHost interface type.
I haven't found any documentation or examples of how to set this. I try
"credentials": { "type": "System.Net.NetworkCredential, System.Net.Primitives", "UserName": "#########", "Password": "#########" }
but this return the error System.InvalidOperationException: 'Cannot create instance of type 'System.Net.ICredentialsByHost' because it is either abstract or an interface.'