jstedfast/MailKit
56.6
Adequate · 5 August 2026
106.1k
lines of production code
C#
primary language
4
measurements over time
What this system is
MailKit is a .NET library for interacting with email protocols including IMAP, POP3, and SMTP. It provides comprehensive client implementations with support for modern features like asynchronous operations, proxy connections, and various security mechanisms such as NTLM and SCRAM. The system also includes extensive documentation, examples, and test coverage to facilitate integration and debugging.
How it got here
2013 — MailKit 4.17.0 release and modernization
10 changes.
This period centered on the MailKit 4.17.0 release, featuring a complete rewrite of the POP3 client and significant enhancements to SMTP and IMAP support. The work included adding new security mechanisms, refactoring for asynchronous operations, and expanding test coverage to ensure robustness.
2014 — IMAP and security enhancements
14 changes.
This period focused on expanding IMAP protocol support with asynchronous methods for COMPRESS, QRESYNC, and UTF8=ACCEPT extensions, alongside a complete rewrite of the search query API. Security was strengthened by adding NTLM SASL mechanism support and TLS channel-binding capabilities. The release also included comprehensive unit test coverage for authentication and message parsing, alongside new sample applications for IMAP client usage.
2015–2024 — Cross-platform samples and proxy support
15 changes.
This period focused on expanding the library's usability and connectivity by introducing comprehensive cross-platform sample applications for iOS and Android. The team also implemented robust proxy client support for HTTP and SOCKS protocols, while simultaneously enhancing documentation and automated build processes to improve developer experience and testing coverage.
Features
Added Android Imap demo project
A new Android sample project for the ImapClient demo has been added, including the solution file and project structure to support running the demo on Android devices.
samples/ImapClientDemo.Android · high confidence
Added Android ImapClient demo app
A new Android sample application has been added to the repository, providing a complete end-to-end example of an IMAP client on the Android platform. The demo includes the necessary Android manifest for internet permissions and a suite of C\# activities (Login, Folders, MessageList, and MessageView) that demonstrate connecting to an IMAP server, authenticating, browsing folders, and viewing message details.
samples/ImapClientDemo.Android/ImapClientDemo.Android · high confidence
Added Android UI layout and resource files for the ImapClientDemo sample
The ImapClientDemo.Android sample now includes the necessary Android resource files to support its user interface. This includes layout definitions for the login screen, message list, and message view, along with string resources and theme definitions. These files define the visual structure of the demo application on Android devices.
samples/ImapClientDemo.Android/ImapClientDemo.Android/Resources · high confidence
Added ImapClientDemo iOS sample project
A new iOS sample application for the ImapClient demo has been added to the repository. This includes the solution file (ImapClientDemo.iOS.sln) which configures the project for both Debug and Release build configurations, enabling users to run and test the IMAP client functionality on iOS devices.
samples/ImapClientDemo, samples/ImapClientDemo.iOS · high confidence
Added ImapClientDemo sample application
A new sample application demonstrating ImapClient usage has been added to the samples directory. This includes the core demo code along with the necessary project property files (AssemblyInfo, Resources, and Settings) to support the sample.
samples/ImapClientDemo/ImapClientDemo/Properties · high confidence
Added Sandcastle-based documentation project with examples and content layout
The documentation build system has been replaced with a new Sandcastle Help File Builder (SHFB) project (Documentation.shfbproj) that generates the HTML help site. This change introduces a structured content layout (ContentLayout.content) and includes a wide range of C\# example files (e.g., DkimVerifierExample.cs, ImapIdleExample.cs, SmtpExamples.cs) that will be rendered into the generated documentation, providing users with concrete code samples for various MailKit and MimeKit APIs.
Documentation · high confidence
Added async support for IMAP COMPRESS, QRESYNC, and UTF8=ACCEPT extensions
The IMAP client now exposes asynchronous methods to enable the IMAP COMPRESS, QRESYNC, and UTF8=ACCEPT extensions. Developers can now call \CompressAsync()\, \EnableQuickResyncAsync()\, and \EnableUTF8Async()\ to negotiate these features with the server. This allows for reduced network bandwidth usage, improved folder resynchronization performance, and support for UTF-8 in mailbox names, respectively. These methods are part of the new \AsyncImapClient\ implementation, providing a consistent asynchronous API for modern .NET applications.
MailKit/Net/Imap · high confidence
Added client-side metrics and channel-binding support for .NET 6+
For .NET 6.0 and later, MailKit now exposes client-side telemetry via the System.Diagnostics.Metrics API, tracking connection and operation durations and counts for IMAP, POP3, and SMTP clients. Additionally, the library now supports TLS channel-binding (endpoint and unique) through a new ExtendedSslStream and IChannelBindingContext interface, enabling more robust authentication scenarios.
MailKit/Net · high confidence
Added comprehensive documentation examples for IMAP, DKIM/ARC, and message handling
Added a large set of new example files in the Documentation/Examples directory to demonstrate usage of the library. This includes new examples for IMAP operations (Idle, body part retrieval, capabilities, namespaces), DKIM signing and verification, ARC signing and verification, message forwarding, body building, and MIME parsing. Existing examples for SMTP, OAuth2, and other features were also updated or added to improve documentation coverage.
Documentation/Examples · high confidence
Added iOS IMAP client demo application
A new iOS sample application has been added to demonstrate IMAP client functionality. The demo includes a login interface for connecting to an IMAP server, a folder browser for navigating mailboxes, and a message list and detail view for reading emails. The implementation uses the MailKit library and includes standard iOS application files such as the app delegate, view controllers, and resource assets.
samples/ImapClientDemo.iOS/ImapClientDemo.iOS · high confidence
Added new documentation pages for MailKit and MimeKit
Added a new set of documentation pages to the project, including Getting-Started, Creating-Messages, Parsing-Messages, Working-With-Messages, Working-With-OpenPGP, and Working-With-SMime. These pages provide comprehensive guides on installing the libraries, creating and parsing email messages, traversing MIME structures, and performing encryption and signing using OpenPGP and S/MIME.
Documentation/Content · high confidence
Added project configuration and documentation files
The repository now includes an .editorconfig file to enforce consistent C\# coding styles and formatting rules across the codebase. Additionally, new documentation files have been added: ExchangeOAuth2.md and GMailOAuth2.md provide detailed guides for configuring OAuth2 authentication with Microsoft Exchange and Google Mail respectively, while FAQ.md and RFCs.md offer comprehensive support resources and protocol references.
(repo-wide) · high confidence
Added protocol specifications for SMTP, IMAP, POP3, and SOCKS
The rfc directory now includes the full text of several key protocol specifications, including RFC 821 (Simple Mail Transfer Protocol), RFC 1652 (SMTP 8bit-MIMEtransport), RFC 1730 (IMAP4), RFC 1731 (IMAP4 Authentication Mechanisms), RFC 1734 (POP3 AUTH), RFC 1854 (SMTP Command Pipelining), and the SOCKS4 protocol specification. These documents provide the necessary reference material for implementing and understanding these protocols.
rfc · high confidence
Added support for IMAP ACL and Annotation extensions
Developers can now manage folder access control lists and read/write folder annotations. The library introduces new types including AccessControl, AccessControlList, AccessRight, AccessRights, Annotation, AnnotationAccess, AnnotationAttribute, and AnnotationEntry, enabling programmatic control over IMAP ACLs and RFC 5257 annotations.
MailKit · high confidence
Automated build and release scripts for testing and versioning
Added PowerShell scripts to automate build, test, and versioning tasks. The new scripts include test.ps1 for running unit tests with optional code coverage via AltCover, test-aot-compatibility.ps1 for validating Ahead-of-Time compilation, update-version.ps1 for updating project and NuGet package versions, and coveralls.ps1 for uploading coverage data. These scripts streamline the CI/CD pipeline and release process.
scripts · high confidence
Complete rewrite of the POP3 client implementation
The POP3 client has been completely rewritten to modernize the codebase, introducing a new \Pop3Engine\ for protocol handling and an \AsyncPop3Client\ for asynchronous operations. This change introduces new public APIs such as \EnableUTF8\ and \EnableUTF8Async\ to support the POP3 UTF-8 extension, and adds a \Pop3Language\ class to handle the POP3 LANG extension. The internal architecture has been restructured to separate the engine logic from the client, improving testability and maintainability while maintaining backward compatibility for synchronous methods.
MailKit/Net/Pop3 · high confidence
Complete rewrite of the search query API with a new object-oriented model
The search query API has been completely rewritten to use a new object-oriented model, introducing specific query types such as AnnotationSearchQuery, BinarySearchQuery, DateSearchQuery, FilterSearchQuery, HeaderSearchQuery, NumericSearchQuery, and TextSearchQuery. The previous flat API has been replaced by a hierarchical structure where queries can be combined using binary operators (AND, OR, NOT) and optimized via an ISearchQueryOptimizer. This change also introduces a new SortOrder enum and OrderBy classes to support sorting search results by various fields like date, size, and headers.
MailKit/Search · high confidence
Implemented NTLM SASL mechanism support
Added support for the NTLM SASL mechanism, including new classes for handling NTLM negotiate, challenge, and authenticate messages, along with supporting utilities for byte conversion, DES encryption, HMAC-MD5, and MD4 hashing. This enables MailKit to perform NTLM authentication for mail servers that require it.
MailKit/Security/Ntlm · high confidence
Introduce the ImapClientDemo sample application
A new Windows Forms-based sample application, ImapClientDemo, has been added to demonstrate IMAP client functionality. The sample includes a login window for connecting to IMAP servers, a main window with a folder tree view, a message list, and a web browser for rendering message content. It implements a command pipeline for executing IMAP operations on background threads and handles various events such as folder selection and message rendering.
samples/ImapClientDemo/ImapClientDemo · high confidence
New SASL authentication mechanisms and security exceptions
Added support for the ANONYMOUS, GSSAPI, LOGIN, CRAM-MD5, DIGEST-MD5, and SCRAM-SHA-1/256/512 SASL mechanisms, enabling more robust and secure authentication options for email clients. The update introduces a new \AuthenticationException\ and \SaslException\ classes to provide detailed error reporting for authentication failures, including specific error codes and mechanism names. Additionally, the library now supports native NTLM and GSSAPI authentication on .NET 7+ and Windows platforms, while maintaining compatibility with older .NET versions through fallback implementations.
MailKit/Security · high confidence
New proxy client implementations for HTTP, HTTPS, and SOCKS protocols
MailKit now supports connecting to mail servers through HTTP, HTTPS, SOCKS4, SOCKS4a, and SOCKS5 proxy servers. The \ProxyClient\ base class and \IProxyClient\ interface have been introduced to standardize proxy connections, with specific implementations for each protocol. Additionally, a \SystemProxy\ property is available on \ProxyClient\ (on .NET 6+) to automatically use the operating system's default proxy settings. This allows users to route their email traffic through various proxy types, improving connectivity in restricted network environments.
MailKit/Net/Proxy · high confidence
Refactored SmtpClient into a partial class with dedicated async and interface files
The SmtpClient implementation has been split into multiple files to improve code organization and support asynchronous operations. The main SmtpClient.cs file contains the core synchronous logic, while AsyncSmtpClient.cs introduces the full suite of async methods (such as SendCommandAsync, FlushCommandQueueAsync, and EhloAsync) alongside the synchronous counterparts. An ISmtpClient interface has been introduced to expose capabilities like RequireTLS, MaxSize, and the Expand/Verify commands. Additionally, new exception types SmtpCommandException and SmtpProtocolException have been added to provide more specific error handling for SMTP command failures and protocol errors, and the SmtpCapabilities enum has been expanded to include the REQUIRETLS extension.
MailKit/Net/Smtp · high confidence
Behavioural changes
ImapIdle sample project structure added
The ImapIdle sample now includes a dedicated .gitignore file to exclude user-specific and build artifacts, alongside a new solution file (ImapIdle.sln) that defines the project configuration for Visual Studio and other IDEs, establishing the standard project structure for this sample.
samples/ImapIdle · high confidence
MailKit 4.17.0 release with updated dependencies and .NET 10 support
The MailKit and MailKitLite NuGet packages have been updated to version 4.17.0. This release updates the MimeKit dependency to 4.17.0 and System.Formats.Asn1 to 10.0.0. It also adds build targets for .NET 10.0 and .NET 8.0, while removing the explicit dependency on System.Net.Http for .NETStandard 2.0. The package now includes portable PDBs for release builds and updates the Getting Started documentation.
nuget · high confidence
Updated ImapIdle sample with improved idle loop and error handling
The ImapIdle sample has been updated to demonstrate a more robust IMAP IDLE implementation. The code now includes a dedicated IdleClient class that manages the connection, authentication, and message fetching logic. Key improvements include handling reconnection on protocol or I/O exceptions, using a timer-based approach for IDLE with a fallback to NOOP polling if the server does not support IDLE, and properly managing cancellation tokens to avoid ObjectDisposedExceptions. The sample also subscribes to folder events (CountChanged, MessageExpunged, MessageFlagsChanged) to detect new messages and fetch their summaries. The Program.cs entry point has been updated to use the new IdleClient class and manage the application lifecycle.
samples/ImapIdle/ImapIdle · medium confidence
Updated MimeKit submodule to commit a3500ee
The MimeKit submodule has been updated to commit a3500eeb7a0bfd98e729973d1a019f324ee710a4. This change brings in the latest updates from the MimeKit library, which may include new features, bug fixes, or performance improvements.
submodules · high confidence
Test coverage
Added AOT compatibility test project; Added IMAP test resources for annotations, quotas, and message parsing; Added comprehensive unit tests for MailKit components; Added unit tests for IMAP authentication secret detection; Added unit tests for NTLM security components; Added unit tests for NetworkStream and SocketUtils; Added unit tests for SearchQuery validation and behavior; Added unit tests for proxy clients and listeners; Expanded unit test coverage for POP3 client and stream components; Expanded unit test coverage for SMTP components; Expanded unit test coverage for security mechanisms.
Dependencies
MailKit assembly version updated to 4.17.0.0
The version information in the MailKit assembly metadata has been updated to 4.17.0.0. This change updates the AssemblyInformationalVersion, AssemblyFileVersion, and AssemblyVersion attributes in the AssemblyInfo.cs file, reflecting the current release version for the library.
MailKit/Properties · high confidence
Updated project files to MailKit 4.17.0 and modernized build configurations
The project files have been updated to reference MailKit version 4.17.0. The main MailKit and MailKitLite projects now target net8.0 and net10.0 in addition to previous frameworks, and include AOT compatibility flags. The UnitTests project has been modernized to use implicit usings, default compile items, and targets net8.0. Sample applications (ImapClientDemo, ImapIdle, Android, and iOS demos) have been updated to use the new project style and reference MailKit 4.17.0.
(dependencies) · high confidence
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 56 → 57 (+0.5)
- Rubric changed (rubric-2026.08.18 → rubric-2026.08.19) — scores are not directly comparable.
Lenses
- Code Health 78 → 78 (+0.0)
- Architecture 90 → 90 (+0.0)
- Maturity 49 → 51 (+1.1)
- Readiness 80 → 80 (+0.0)
- Security 52 → 52 (+0.0)
- Performance 60 → 60 (+0.0)
Resolved (6)
- Envelope.TryParse (cyclomatic 17) (MailKit/Envelope.cs)
- Envelope.TryParse (cyclomatic 23) (MailKit/Envelope.cs)
- Off-boarding risk: anonymized user #1
- The README table lists all packages (MimeKit, MimeKitLite, MailKit, MailKitLite) and their NuGet/MyGet badges but gives no description of what MailKit does for each package or the features it provides compared to its alternatives. (README.md)
- The README table shows build status but no documentation of what MailKit does (e.g. sending, retrieving via IMAP) is present. (README.md)
- redundant comment (MailKit/Net/Imap/ImapEngine.cs)
New (4)
- Envelope.TryParse (cyclomatic 17) (MailKit/Envelope.cs)
- Envelope.TryParse (cyclomatic 23) (MailKit/Envelope.cs)
- Off-boarding risk: anonymized user #1
- redundant comment (MailKit/DuplexStream.cs)
Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
jstedfast/MailKit was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 5 August 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 08bf9a500d34d1b52927b31304fb910e4b9d630e — the exact code this score is about.
- Scored under rubric-2026.08.19 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer latest.