GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — log4net.Ext.Mail by FreeAndNil · Pull Request #302 · apache/logging-log4net

Conversation

@FreeAndNil

@FreeAndNil FreeAndNil commented Jul 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

fixes #300

Microsoft no longer recommends System.Net.Mail.SmtpClient, and it increasingly
fails against modern mail servers. This adds a satellite assembly
log4net.Ext.Mail with a MailKit based SmtpAppender, so log4net itself takes on
no mail dependency.

  • Same options as log4net.Appender.SmtpAppender - migrating means changing only
    the type attribute.
  • Behaviour differences: smtpHost is required, enableSsl negotiates implicit
    TLS/STARTTLS automatically, Ntlm needs explicit credentials (MailKit cannot
    reuse the Windows logon session), and semicolon-separated recipient lists now
    parse correctly.
  • Site docs now recommend the new appender; all SMTP samples use it.
  • Adds Log4NetAssert.EnsureNotNullOrEmpty.

Also included, unrelated to #300: TelnetAppender registers the client before
sending the welcome banner, fixing a HasConnections race that dropped messages.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
FreeAndNil added 13 commits July 28, 2026 16:22
@FreeAndNil
#300 create new assemblies for SmtpAppender
37762d0
@FreeAndNil
add MailKit based SmtpAppender to log4net.Ext.Mail
f7c1649
log4net.Ext.Mail.Appender.SmtpAppender exposes the same options as
log4net.Appender.SmtpAppender, but sends via MailKit instead of the obsolete
System.Net.Mail.SmtpClient. Sending goes through the new ISmtpTransport
abstraction (default: MailKitSmtpTransport) so the appender can be tested
without an SMTP server.
@FreeAndNil
Merge branch 'master' into Feature/302-log4net.Ext.Mail
0d90714
@FreeAndNil
add tests for the MailKit based SmtpAppender
359c548
@FreeAndNil
- TelnetAppender: register client before sending welcome banner
61bf6ff
  (log messages could be dropped via HasConnections race)
- test: free TCP port, locked receive buffer, assert on stream
  content instead of read count, 30s timeout, log client errors
@FreeAndNil
Move ISmtpTransport and MailKitSmtpTransport to Appender/Internal
a4bcb32
@FreeAndNil
Make the MailKit transport internal
0bf9049
@FreeAndNil
document the MailKit based SmtpAppender
e7d9ff2
Recommend the MailKit appender from log4net.Ext.Mail over the built-in one,
which relies on the deprecated System.Net.Mail.SmtpClient, and port all
configuration samples to the new type. Adds the changelog entry for #300.
@FreeAndNil
Merge branch 'master' into Feature/302-log4net.Ext.Mail
c2f5344
@FreeAndNil
simplify type in return statement
62b64b2
@FreeAndNil
Merge branch 'master' into Feature/302-log4net.Ext.Mail
3a23a98
@FreeAndNil
fix PackageVersion for MauiTestApplication
6c9fc5b
@FreeAndNil
Deprecate the built-in SmtpAppender and release log4net.Ext.Mail #300
f163709
@FreeAndNil
FreeAndNil requested review from fluffynuts and gdziadkiewicz August 3, 2026 14:27
@FreeAndNil FreeAndNil added this to the 3.4.0 milestone Aug 3, 2026
@FreeAndNil
FreeAndNil marked this pull request as ready for review August 3, 2026 14:29
@FreeAndNil FreeAndNil mentioned this pull request Aug 3, 2026
SmtpAppender uses not recomended SmptClient #300
Closed
fluffynuts
fluffynuts approved these changes Aug 4, 2026
View reviewed changes

@fluffynuts fluffynuts left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@FreeAndNil
FreeAndNil merged commit 3671c78 into master Aug 4, 2026
3 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@FreeAndNil
FreeAndNil deleted the Feature/302-log4net.Ext.Mail branch August 4, 2026 08:05
This was referenced Aug 21, 2026
Bump log4net from 3.3.2 to 3.4.0 OPCFoundation/UA-EdgeTranslator#118
Merged
Bump log4net from 3.3.2 to 3.4.0 overdrive1708/FastFileReadonly#13
Merged
Bump log4net from 3.3.2 to 3.4.0 afonsoft/EAF#377
Merged
Bump log4net and Microsoft.Extensions.Logging.Console quartznet/quartznet#3354
Merged
Bump the all-updates group with 5 updates frasermolyneux/demo-manager#67
Merged
Bump Aspire.Hosting.AppHost and 14 others sheshankchandra/EggLedger#74
Closed
deps: Bump log4net from 3.3.2 to 3.4.0 wojciechowskiapp/Kaption#13
Closed
Bump the nuget-dependencies group with 10 updates SvenGroot/JumboCore#51
Closed
Bump log4net and 8 others SvenGroot/JumboCore#52
Closed
This was referenced Nov 10, 2026
Bump the minor-version-updates group with 5 updates PxTools/PCAxis.Serializers#219
Merged
Bump the nuget-dependencies group with 14 updates SvenGroot/JumboCore#76
Closed
Bump Crc32.NET and 12 others SvenGroot/JumboCore#77
Closed
Bump log4net from 3.3.2 to 3.5.0 filadelfija-cyber/Reposter#1
Merged
Bump log4net from 3.2.0 to 3.5.0 marcmy/ProtonVPN-win-app#153
Closed
Dependency (dependabot/nuget): Bump log4net from 3.2.0 to 3.5.0 sg-scale/NETworkManager--2025.10.18.0#10
Open
Bump the nuget-dependencies group with 14 updates SvenGroot/JumboCore#78
Closed
Bump Crc32.NET and 12 others SvenGroot/JumboCore#79
Closed
Bump log4net from 3.3.2 to 3.5.0 jasonlandreth/GarminR10-BLE-Connector#6
Closed
Bump log4net from 3.3.0 to 3.5.0 chutch3/kenku#87
Merged
Bump log4net from 2.0.15 to 3.6.0 sg-scale/NETworkManager--2022.12.20.0#5
Open
Bump the minor-version-updates group with 4 updates PxTools/PCAxis.Menu.OracleDatamodelMenu#115
Merged
Bump log4net and 3 others PxTools/PCAxis.Metadata#108
Merged
Bump Crc32.NET and 12 others SvenGroot/JumboCore#80
Closed
Bump the nuget-dependencies group with 14 updates SvenGroot/JumboCore#81
Closed
Bump log4net and 4 others PxTools/PCAxis.Menu.MsSqlDatamodelMenu#114
Merged
Bump log4net and 3 others PxTools/PXWeb.SavedQuery.Oracle#119
Merged
Bump log4net and 4 others PxTools/PCAxis.Core#142
Merged
Bump log4net from 3.3.1 to 3.6.0 bbtsoftware/AzureDevOpsPolicyConfigurator#255
Open
Bump the minor-version-updates group with 4 updates PxTools/PCAxis.Menu#100
Merged
Bump log4net and 3 others PxTools/PCAxis.Query#113
Merged
Bump log4net and PCAxis.Core PxTools/PCAxis.Query#114
Closed
Bump log4net from 2.0.8 to 3.6.0 devsecops-lab-luis/demo-ghas-multilenguaje#27
Open
Dependency (dependabot/nuget): Bump log4net from 3.3.0 to 3.6.0 Nevergoodstudy/NETworkManager-macOS#24
Open
Bump the nuget-dependencies group with 14 updates SvenGroot/JumboCore#82
Open
Bump Crc32.NET and 12 others SvenGroot/JumboCore#83
Open
deps: Bump log4net from 3.3.2 to 3.6.0 OliverRetro/WavePlus#62
Open
Bump log4net from 3.3.1 to 3.6.0 bNobo/needabreak#176
Open
This was referenced Nov 19, 2026
Bump log4net from 3.3.2 to 3.6.0 jasonlandreth/GarminR10-BLE-Connector#7
Open
Bump Crc32.NET and 12 others SvenGroot/JumboCore#84
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@fluffynuts fluffynuts fluffynuts approved these changes
@gdziadkiewicz gdziadkiewicz Awaiting requested review from gdziadkiewicz

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

3.4.0

Development

Successfully merging this pull request may close these issues.

SmtpAppender uses not recomended SmptClient

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@FreeAndNil @fluffynuts
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.