As stated in the title, I've had some issues finding an appender that states that it support the TLS encryption standard.
I've been trying to use the SmtpAppender but can't get it to work and suspect it has to do with the smtp server requiring TLS encryption and SmtpAppender might not supporting this.
setup from Office365 manual
The Manual
The configuration used:
<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
<to value="my email" />
<from value="The senders email" />
<Username value="JohnDoe"></Username>
<password value="NoWay" ></password>
<authentication value="Basic"></authentication>
<subject value="Test message" />
<smtpHost value="pod51011.outlook.com" />
<port value="587" />
<bufferSize value="512" />
<lossy value="true" />
<EnableSsl value="true"/>
<evaluator type="log4net.Core.LevelEvaluator">
<threshold value="INFO"/>
</evaluator>
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%newline%date [%thread] %-5level %logger [%property{NDC}] - %message%newline%newline%newline" />
</layout>
</appender>
After some extra researching and actually testing using the newest Log4Net version 1.2.11 the answer is: Yes.
The question is somewhat answered here C# ASP.NET Send Email via TLS and looking into the issue tracking of Log4Net allow smtp to ssl authenticate and with certificates. it is documented that Log4Net has a switch EnableSsl which, as implied by the name, enables SSL supporty which by first link falls under TLS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With