This is an automated email from the ASF dual-hosted git repository.

FreeAndNil pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4net.git


The following commit(s) were added to refs/heads/master by this push:
     new ab8d1139 separated readme for log4net.Ext.Mail
ab8d1139 is described below

commit ab8d11391236a9e6ebc965960ef8b95cb314baba
Author: Jan Friedrich <[email protected]>
AuthorDate: Tue Aug 4 10:30:16 2026 +0200

    separated readme for log4net.Ext.Mail
---
 README.md                                    |   4 +
 doc/RELEASING.md                             |   3 +-
 src/log4net.Ext.Mail/README.md               | 107 +++++++++++++++++++++++++++
 src/log4net.Ext.Mail/log4net.Ext.Mail.csproj |   2 +-
 4 files changed, 114 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 34374d56..32ab239a 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,10 @@ Web site: http://logging.apache.org/log4net
 For the latest documentation see the log4net web site at:
 http://logging.apache.org/log4net
 
+## Extensions
+
+- [log4net.Ext.Mail](https://www.nuget.org/packages/log4net.Ext.Mail) - 
MailKit-based SMTP appender for sending log events via email (recommended 
replacement for the deprecated SmtpAppender)
+
 # Contributing
 
 log4net development happens on 
[Github](https://github.com/apache/logging-log4net)
diff --git a/doc/RELEASING.md b/doc/RELEASING.md
index 6f1eac4d..6f1e089f 100644
--- a/doc/RELEASING.md
+++ b/doc/RELEASING.md
@@ -63,7 +63,8 @@ release version 3.2.1:
     - copy all artifacts to the new folder
     - `svn add *`
     - `svn commit`
-14. push the .nupkg to nuget.org
+14. push the .nupkg files to nuget.org
+    - push all `apache-log4net*.nupkg` files from build/artifacts
     - via `dotnet`: `dotnet nuget push <path to package> -s nuget.org -k <your 
nuget api key>`
     - via `nuget`: `nuget push <path to package> -Source nuget.org -ApiKey 
<your nuget api key>`
 15. don't forget to make the docs live: in the logging-log4net-site folder:
diff --git a/src/log4net.Ext.Mail/README.md b/src/log4net.Ext.Mail/README.md
new file mode 100644
index 00000000..0dfc2356
--- /dev/null
+++ b/src/log4net.Ext.Mail/README.md
@@ -0,0 +1,107 @@
+# log4net.Ext.Mail
+
+A MailKit-based SMTP appender for log4net, recommended as the replacement for 
the deprecated built-in `System.Net.Mail.SmtpClient` appender.
+
+## Overview
+
+`log4net.Ext.Mail` provides a satellite package that extends 
[log4net](https://www.nuget.org/packages/log4net/) with a modern email 
appender. It uses [MailKit](https://github.com/jstedfast/MailKit) instead of 
the deprecated `System.Net.Mail.SmtpClient`, so you can reliably send log 
events via SMTP on modern servers.
+
+The appender exposes the same API as the legacy 
`log4net.Appender.SmtpAppender`, making migration straightforward - you only 
need to change the `type` attribute in your log4net configuration.
+
+## Installation
+
+```bash
+dotnet add package log4net.Ext.Mail
+```
+
+## Quick Start
+
+Configure the appender in your `App.config` or `app.config`:
+
+```xml
+<configuration>
+  <configSections>
+    <section name="log4net" type="System.Configuration.IgnoreSectionHandler" />
+  </configSections>
+
+  <log4net>
+    <appender name="SmtpAppender" 
type="log4net.Ext.Mail.Appender.SmtpAppender, log4net.Ext.Mail">
+      <to value="[email protected]" />
+      <from value="[email protected]" />
+      <subject value="Log Event" />
+      <smtpHost value="mail.example.com" />
+      <port value="587" />
+      <enableSsl value="true" />
+      <authentication value="Basic" />
+      <username value="[email protected]" />
+      <password value="password" />
+      <bufferSize value="512" />
+      <lossy value="true" />
+      <evaluator type="log4net.Core.LevelEvaluator">
+        <threshold value="ERROR" />
+      </evaluator>
+      <layout type="log4net.Layout.PatternLayout">
+        <conversionPattern value="%date [%thread] %-5level %logger - 
%message%newline" />
+      </layout>
+    </appender>
+
+    <root>
+      <level value="INFO" />
+      <appender-ref ref="SmtpAppender" />
+    </root>
+  </log4net>
+</configuration>
+```
+
+Then configure log4net in your code:
+
+```csharp
+[assembly: log4net.Config.XmlConfigurator(Watch = true)]
+```
+
+## Key Differences from the Built-in Appender
+
+| Feature | Built-in | log4net.Ext.Mail.Appender.SmtpAppender |
+|---------|----------|----------------------------------------|
+| SMTP Client | `System.Net.Mail.SmtpClient` (deprecated) | MailKit |
+| TLS Support | Limited | Full (Auto, Explicit, Implicit) |
+| Modern Servers | Often fails | ✓ Recommended |
+| `smtpHost` | Optional | Required |
+| `enableSsl` | true/false | true/false (negotiates Auto/None) |
+| `Ntlm` auth | Uses Windows logon | Requires explicit credentials |
+
+## Configuration Options
+
+### Required
+- `to` - recipient email address (comma or semicolon delimited)
+- `from` - sender email address
+- `subject` - email subject line
+- `smtpHost` - SMTP server hostname
+
+### Optional
+- `cc` - carbon copy recipients
+- `bcc` - blind carbon copy recipients
+- `replyTo` - reply-to address
+- `port` - SMTP port (default: 25)
+- `enableSsl` - negotiate TLS/STARTTLS (true/false, default: false)
+- `authentication` - `None`, `Basic`, or `Ntlm` (default: `None`)
+- `username` - username for authentication
+- `password` - password for authentication
+- `priority` - email priority (`Low`, `Normal`, `High`)
+- `bufferSize` - buffer up to N events before sending (default: 512)
+- `lossy` - discard buffered events if trigger never fires (default: false)
+- `evaluator` - custom evaluator to trigger sending (e.g., `LevelEvaluator`)
+
+## Frameworks
+
+Targets **.NET Standard 2.0**, so it works with:
+- .NET Framework 4.7.1+
+- .NET 8+
+
+## Documentation
+
+For complete configuration examples and detailed options, see the [log4net 
SmtpAppender 
documentation](https://logging.apache.org/log4net/manual/configuration/appenders/smtpappender.html).
+
+## License
+
+Licensed under the Apache License 2.0. See the LICENSE file for details.
\ No newline at end of file
diff --git a/src/log4net.Ext.Mail/log4net.Ext.Mail.csproj 
b/src/log4net.Ext.Mail/log4net.Ext.Mail.csproj
index cc92e95d..6da32c03 100644
--- a/src/log4net.Ext.Mail/log4net.Ext.Mail.csproj
+++ b/src/log4net.Ext.Mail/log4net.Ext.Mail.csproj
@@ -70,7 +70,7 @@
     <Compile Include="..\log4net\Util\Log4NetAssert.cs" 
Link="Util\Log4NetAssert.cs" />
   </ItemGroup>
   <ItemGroup>
-    <None Include="..\..\README.md" Pack="true" PackagePath="\" />
+    <None Include="README.md" Pack="true" />
   </ItemGroup>
   <ItemGroup Label="Packaging">
     <Content Include="..\..\package-icon.png" PackagePath="package-icon.png">

Reply via email to