Skip to content
CAI
Software that uses CAICheck a score

jstedfast/MailKit

47.6

Weak · 12 November 2026

116.5k

lines of production code

C#

primary language

7

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Features

Added .NET 6+ telemetry for connection and operation metrics

For applications targeting .NET 6 or later, MailKit now emits standard .NET telemetry (Activity and Meter) for network operations. This includes recording connection duration and operation counts/durations for IMAP, POP3, and SMTP clients, along with detailed error tagging (e.g., host\_not\_found, connection\_refused, protocol\_error) to facilitate integration with observability tools.

MailKit/Net · high confidence

Added Android IMAP client demo application

A new Android sample application has been added to demonstrate MailKit usage. The app includes a login screen for connecting to an IMAP server, a folder browser that recursively lists mailboxes, a message list view showing subject, sender, and date, and a message viewer for displaying email bodies. It also provides guidance for users regarding Gmail's 'less secure apps' setting.

samples/ImapClientDemo.Android/ImapClientDemo.Android · high confidence

Added Android Imap Demo solution

A new Visual Studio solution file (ImapClientDemo.Android.sln) has been added for the Android Imap client demo sample. This solution targets Visual Studio 17 and configures the project for Debug and Release builds on any CPU, providing a standalone entry point for users to run and test the Android-specific IMAP client functionality.

samples/ImapClientDemo.Android · high confidence

Added Android UI resource definitions for the ImapClientDemo sample

The Android sample project now includes the necessary resource files to support its user interface. This adds layout definitions for the login screen (server, port, SSL, credentials), folder and message lists, and message viewing, along with string resources, app theme, and adaptive icon configurations required for the .NET migration.

samples/ImapClientDemo.Android/ImapClientDemo.Android/Resources · high confidence

Added IMAP ACL support types

Added the AccessControl, AccessControlList, AccessRight, and AccessRights classes to support the IMAP ACL extension, enabling developers to manage folder permissions and access rights.

MailKit · high confidence

Added ImapClientDemo sample project

A new sample project named ImapClientDemo has been added to the samples directory. This includes the Visual Studio solution file (ImapClientDemo.sln) for building the demo and a .gitignore file to exclude user-specific preferences and build artifacts from version control.

samples/ImapClientDemo, samples/ImapClientDemo.iOS · high confidence

Added RFC documentation for SOCKS4, SASL LOGIN, SMTP, IMAP4, and POP3 protocols

The rfc directory now includes text files for several foundational protocol specifications, including SOCKS4 (SOCKS4.protocol), the obsolete LOGIN SASL mechanism (draft-murchison-sasl-login-00.txt), SMTP (RFC 821, RFC 1652, RFC 1854), IMAP4 (RFC 1730, RFC 1731), and POP3 AUTH (RFC 1734). These files serve as reference documentation for the library's protocol implementations.

rfc · high confidence

Added iOS ImapClientDemo sample application

A new iOS sample application has been added to demonstrate IMAP client usage. The sample includes a complete UI for connecting to an IMAP server (including login, folder browsing, and message viewing), a custom URL cache for handling multipart/related content, and the necessary iOS project configuration files (Info.plist, Entitlements, Assets, and Storyboards).

samples/ImapClientDemo.iOS/ImapClientDemo.iOS · high confidence

Complete rewrite of the POP3 client implementation

The POP3 client has been completely rewritten from scratch, introducing a new \Pop3Engine\ to manage the protocol state and command pipeline, alongside a new \Pop3Client\ that implements the \IPop3Client\ interface. This change adds support for modern POP3 extensions including UTF-8 encoding, the LANG extension for localized error messages, and PIPELINING for improved performance. The new implementation also features a dedicated \Pop3AuthenticationSecretDetector\ to safely redact credentials in logs, splits error handling into specific \Pop3CommandException\ and \Pop3ProtocolException\ types, and exposes server capabilities via a new \Pop3Capabilities\ enum.

MailKit/Net/Pop3 · high confidence

Expanded documentation examples for ARC, DKIM, IMAP, and MIME operations

The Documentation/Examples directory has been significantly expanded with new sample code files to help users implement common and advanced email operations. New examples include ArcSignerExample.cs and ArcVerifierExample.cs for signing and verifying ARC (Authenticated Received Chain) signatures, DkimExamples.cs and DkimVerifierExample.cs for DKIM signing and verification, and AttachmentExamples.cs for saving message attachments. The update also adds comprehensive IMAP usage samples in ImapExamples.cs and ImapBodyPartExamples.cs, covering protocol logging, capabilities, and body part retrieval. Additionally, new files demonstrate MIME structure creation (CreateSimpleMessage.cs, CreateMultipartMixed.cs, CreateMultipartAlternative.cs), content filtering (FilterExamples.cs), header manipulation (HeaderExamples.cs), and message forwarding (ForwardExamples.cs).

Documentation/Examples · high confidence

IMAP search and sort capabilities expanded with new query types and options

The IMAP search and sort API has been significantly extended to support modern IMAP extensions. Users can now search using annotations (RFC 5257), predefined filters, and fuzzy matching with relevancy scores. The search query model has been refactored into specific query types (e.g., AnnotationSearchQuery, FilterSearchQuery) to support these new features, and the SearchResults class now includes properties for mod-sequences, relevancy scores, and partial result ranges (RFC 9394). Additionally, the Sort API now supports ordering by annotations and exposes OrderByType and SortOrder for more granular control over result ordering.

MailKit/Search · high confidence

New CI/CD and release automation scripts

The repository now includes a set of PowerShell scripts in the \scripts/\ directory to streamline testing, code coverage reporting, and version management. \test.ps1\ orchestrates unit tests using NUnit and integrates AltCover for code instrumentation, automatically re-signing MailKit.dll to maintain strong-name compatibility after instrumentation. \coveralls.ps1\ uploads OpenCover XML coverage data to Coveralls.io, utilizing the \csmacnz.Coveralls\ .NET tool. \update-version.ps1\ automates the process of bumping version numbers across the MailKit project file, AssemblyInfo, NuGet spec, and sample project references, while also syncing the MimeKit.Core dependency version. Additionally, \test-aot-compatibility.ps1\ provides a dedicated test to verify Ahead-of-Time (AOT) compilation compatibility by publishing and running an AOT test application.

scripts · high confidence

New ImapIdle sample demonstrating two IDLE patterns

The ImapIdle sample now provides two distinct approaches for monitoring IMAP folder changes: a 'session-based' pattern using ImapIdleSession for simpler, non-reentrant code, and a 'manual' pattern using ImapClient.IdleAsync with folder events for classic event-driven handling. Both implementations share a base class that manages connection, authentication, and message summary caching, allowing users to choose the style that best fits their application architecture.

samples/ImapIdle/ImapIdle · high confidence

New SASL authentication types and platform-specific crypto backends

The MailKit.Security namespace now includes new exception types (AuthenticationException, SaslException with error codes) and a base SaslMechanism class that ranks mechanisms by security (SCRAM-SHA-512/256/1, NTLM, DIGEST-MD5, CRAM-MD5, PLAIN, LOGIN). New concrete mechanisms are added: ANONYMOUS, CRAM-MD5, DIGEST-MD5 (with authorization identifier support), LOGIN, and GSSAPI (Kerberos) on .NET 7+. For Windows Runtime targets, platform-specific implementations are provided for keyed hashing (HMAC-SHA1/SHA256) and random number generation to support these SASL flows.

MailKit/Security · high confidence

New Sandcastle-based documentation project added

The documentation has been restructured into a new Sandcastle Documentation project, introducing a set of new .aml topic files (such as Introduction, Getting Started, Creating Messages, and Working With Messages) that provide updated guides, API references, and examples for using MimeKit and MailKit.

Documentation/Content · high confidence

New proxy client implementations for HTTP, HTTPS, SOCKS4, and SOCKS5

MailKit now includes a new \MailKit.Net.Proxy\ namespace with concrete proxy client classes (\HttpProxyClient\, \HttpsProxyClient\, \Socks4Client\, \Socks4aClient\, \Socks5Client\) and a base \ProxyClient\ class. This allows users to connect to mail servers through various proxy types, including HTTP CONNECT proxies with authentication, HTTPS proxies with SSL/TLS configuration, and SOCKS4/4a/5 proxies. The \HttpsProxyClient\ supports configurable SSL protocols and certificate validation, while \ProxyClient\ provides a \SystemProxy\ static property (on .NET 6+) to automatically use the system's default proxy settings.

MailKit/Net/Proxy · high confidence

Behavioural changes

Documentation now supports light and dark themes with OS preference detection

The documentation site has been restyled to match the mimekit.net website, introducing a new visual theme that includes both light and dark modes. A new theme switcher script allows users to toggle between these modes, and the system now respects the operating system's color scheme preference by default, only switching to a manual override when the user explicitly chooses a theme. The styling also includes custom scrollbar colors and print-specific adjustments to hide navigation elements.

Documentation/css, Documentation/scripts · high confidence

IMAP client API refactoring and new interface definitions

The IMAP client implementation has been refactored to introduce new internal interfaces (IImapClient, IImapFolder) and dedicated callback types (ImapFetchStreamCallback, ImapFetchStreamAsyncCallback) for stream fetching operations. This change also adds a specialized ImapAuthenticationSecretDetector to improve the redaction of sensitive credentials in protocol logs. These updates restructure the internal command and engine handling to support the broader API changes in the library.

MailKit/Net/Imap · medium confidence

ImapIdle sample project structure and configuration updates

The ImapIdle sample has been updated to use PackageReference for NuGet dependencies and includes a new .gitignore file to exclude user-specific Visual Studio files (such as .userprefs, .suo, and packages folders). The solution file has also been regenerated to reflect the current project structure.

samples/ImapIdle · medium confidence

MailKit 4.18.1 NuGet package release

The MailKit NuGet package has been updated to version 4.18.1, which bumps the MimeKit dependency from 4.18.0 to 4.18.1 and fixes an issue where telemetry duration histograms were 100x too large on Linux and macOS. The package now targets .NET Framework 4.6.2, 4.7, and 4.8, as well as .NET Standard 2.0 and 2.1, .NET 8.0, and .NET 10.0, and includes a new Getting Started guide with code samples for SMTP, POP3, and IMAP usage.

nuget · high confidence

MailKit assembly metadata and versioning configuration

The MailKit assembly metadata has been configured with version 4.18.1.0 for release and informational purposes, while the runtime assembly version is set to 4.18.0.0. The assembly is now marked as ComVisible (true) to expose types to COM components, and the UnitTests assembly has been granted internal visibility via a strong-name public key.

MailKit/Properties · high confidence

New Sandcastle-based documentation project with examples and proxy namespace coverage

The documentation build system has been replaced with a Sandcastle Help File Builder (SHFB) project, generating a website-style API reference for MailKit and MimeKit. This update includes a comprehensive set of code examples (such as IMAP IDLE, DKIM/ARC verification, and S/MIME), adds documentation coverage for the MailKit.Net.Proxy namespace, and incorporates screenshots for cloning and updating the source code via TortoiseGit.

Documentation · high confidence

Rewritten NTLM authentication implementation

The NTLM security module has been completely rewritten to align with the official Microsoft MS-NLMP specification, introducing new classes for handling NTLM negotiate, challenge, and authenticate messages, along with dedicated support for NTLMv2 session security, target info encoding, and proper MD4 hashing. This change improves compatibility and correctness for NTLM-based authentication flows by ensuring strict adherence to protocol standards, including correct handling of domain/workstation preferences, flag negotiation, and secure buffer management.

MailKit/Security/Ntlm · high confidence

SmtpClient API restructured with dedicated exception types and protocol logging

The SmtpClient implementation has been refactored to improve error handling and observability. The previous generic SmtpException is now split into SmtpProtocolException (for fatal communication errors requiring reconnection) and SmtpCommandException (for specific command failures like rejected recipients), both of which now include detailed context such as the specific SMTP command, status code, and response text. Additionally, a new SmtpAuthenticationSecretDetector has been added to automatically redact sensitive credentials in protocol logs, and the SmtpDataFilter is now part of the public API for custom message stream processing.

MailKit/Net/Smtp · high confidence

Updated MimeKit submodule to commit 8e82139

The MimeKit submodule has been updated to commit 8e821396c81f2588b45578a1d63c293a1a101805. This change incorporates the latest fixes and improvements from the MimeKit library into the project, ensuring that the application benefits from the most recent bug fixes, performance optimizations, and feature updates provided by the upstream dependency.

submodules · high confidence

Test coverage

Added AOT compatibility verification program; Added unit tests for NTLM security components; Added unit tests for NetworkStream and SocketUtils; Added unit tests for SASL authentication mechanisms and security contexts; Added unit tests for SearchQuery validation and behavior; Added unit tests for proxy clients and listeners; Expanded IMAP unit test coverage with new resource fixtures; Expanded unit test coverage for IMAP client components; Expanded unit test coverage for POP3 client, stream, and authentication secret detection; Expanded unit test coverage for SMTP authentication, error handling, and data filtering; Expanded unit test coverage for core library components.

Dependencies

MailKit 4.18.1 release with .NET 10.0 support and AOT compatibility

MailKit version 4.18.1 is now available, adding support for the .NET 10.0 target framework alongside existing targets like .NET 8.0 and .NET Framework 4.6.2+. The library is now marked as AOT-compatible for .NET 7.0+ targets, and a new AotCompatibility sample project has been added to verify trimming and NativeAOT publishing. The release also updates the System.Formats.Asn1 dependency to version 10.0.0 and updates the UnitTests project to target .NET 8.0 with updated test SDK and NUnit packages.

(dependencies) · high confidence

Housekeeping

Initial project scaffolding and documentation

The repository has been initialized with the core project structure, including solution files for MailKit, MimeKit, and unit tests, alongside essential configuration files like .editorconfig, .gitignore, and .gitattributes. Comprehensive documentation has been added, including a Frequently Asked Questions guide, specific OAuth2 setup instructions for GMail and Exchange, a list of supported RFCs, and an MIT license.

(repo-wide) · high confidence

Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 46 → 48 (+1.6)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.3) — scores are not directly comparable.

Lenses

  • Code Health 67 → 66 (-0.7)
  • Architecture 93 → 69 (-24.0)
  • Maturity 51 → 61 (+10.3)
  • Readiness 81 → 80 (-0.3)
  • Security 30 → 30 (+0.0)
  • Performance 60 → 60 (-0.5)

Resolved (20)

  • ClientCommandPipeline.MainLoop (cognitive 22) (samples/ImapClientDemo/ImapClientDemo/ClientCommandPipeline.cs)
  • Coverage not measured — no coverage collector is wired up
  • Duplicated block (10 lines × 2) (MailKit/BodyPart.cs)
  • Duplicated block (10 lines × 2) (MailKit/Net/Imap/ImapUtils.cs)
  • Duplicated block (13 lines × 2) (MailKit/Net/Imap/ImapUtils.cs)
  • Duplicated block (17 lines × 2) (MailKit/Net/Imap/ImapFolderFetch.cs)
  • Duplicated block (17 lines × 2) (MailKit/Net/Imap/ImapFolderFetch.cs)
  • Duplicated block (18 lines × 2) (MailKit/Net/Imap/ImapFolderFetch.cs)
  • ImapUtils.ParseMultipart (cognitive 18) (MailKit/Net/Imap/ImapUtils.cs)
  • ImapUtils.ParseMultipartAsync (cognitive 18) (MailKit/Net/Imap/ImapUtils.cs)
  • Members sharing a duplicated core (4 members, 50+ identical tokens) (MailKit/Net/Imap/ImapUtils.cs)
  • MultipartRelatedImageContext.HtmlTagCallback (cognitive 42) (samples/ImapClientDemo/ImapClientDemo/MultipartRelatedImageContext.cs)
  • MultipartRelatedImageContext.HtmlTagCallback (cyclomatic 21) (samples/ImapClientDemo/ImapClientDemo/MultipartRelatedImageContext.cs)
  • Projects may be oversized for their cohesion
  • RenderMessageCommand.DownloadBodyPart (cognitive 35) (samples/ImapClientDemo/ImapClientDemo/MainWindow.cs)
  • XML-doc coverage: ImapClientDemo (samples/ImapClientDemo/ImapClientDemo/ImapClientDemo.csproj)
  • XML-doc coverage: ImapClientDemo.Android (samples/ImapClientDemo.Android/ImapClientDemo.Android/ImapClientDemo.Android.csproj)
  • XML-doc coverage: ImapClientDemo.iOS (samples/ImapClientDemo.iOS/ImapClientDemo.iOS/ImapClientDemo.iOS.csproj)
  • XML-doc coverage: ImapIdle (samples/ImapIdle/ImapIdle/ImapIdle.csproj)
  • XML-doc coverage: MailKit(netstandard2.0) (MailKit/MailKit.csproj)

New (40)

  • BodyPart.Encode (cognitive 26) (MailKit/BodyPart.cs)
  • BodyPart.TryParseBodyPart (cognitive 50) (MailKit/BodyPart.cs)
  • BodyPart.TryParseBodyPart (cyclomatic 31) (MailKit/BodyPart.cs)
  • ClassTooLong: BodyPart (MailKit/BodyPart.cs)
  • Duplicated block (10 lines × 2) (MailKit/BodyPart.cs)
  • Duplicated block (10 lines × 2) (MailKit/Net/Imap/ImapUtils.cs)
  • Duplicated block (12 lines × 2) (MailKit/Net/Imap/ImapUtils.cs)
  • Duplicated block (14 lines × 2) (MailKit/Net/Imap/ImapUtils.cs)
  • Duplicated block (17 lines × 2) (MailKit/Net/Imap/ImapFolderFetch.cs)
  • Duplicated block (17 lines × 2) (MailKit/Net/Imap/ImapFolderFetch.cs)
  • Duplicated block (20 lines × 2) (MailKit/Net/Imap/ImapFolderFetch.cs)
  • Duplicated block (28 lines × 2) (MailKit/Net/Imap/ImapUtils.cs)
  • Edited copy of a member (12 corresponding lines) (samples/ImapClientDemo.iOS/ImapClientDemo.iOS/FoldersViewController.cs)
  • Edited copy of a member (14 corresponding lines) (MailKit/Net/SocketMetrics.cs)
  • Edited copy of a member (16 corresponding lines) (MailKit/Net/Proxy/WebProxyClient.cs)
  • Edited copy of a member (22 corresponding lines) (samples/ImapClientDemo.Android/ImapClientDemo.Android/FoldersActivity.cs)
  • ImapUtils.ParseContentType (cognitive 20) (MailKit/Net/Imap/ImapUtils.cs)
  • ImapUtils.ParseContentTypeAsync (cognitive 20) (MailKit/Net/Imap/ImapUtils.cs)
  • MainWindowViewModel.ConnectAsync (cognitive 16) (samples/ImapClientDemo/ImapClientDemo/MainWindowViewModel.cs)
  • MainWindowViewModel.ConnectAsync (cyclomatic 16) (samples/ImapClientDemo/ImapClientDemo/MainWindowViewModel.cs)
  • …and 20 more

Changes since last survey

  • 15 commits — 13 feature/other, 2 fixes

By area

  • (root) — 5 commits
  • submodules/MimeKit — 3 commits
  • MailKit/Net — 2 commits
  • Documentation/Content — 1 commit
  • Documentation/Examples — 1 commit
  • UnitTests/Net — 1 commit
  • samples/ImapClientDemo — 1 commit
  • scripts/PackageSmokeTests — 1 commit

Notable commits

  • fix: Fix platform-specific newlines in content storage tests
  • fix: Fixed HttpProxyClient to accept a CONNECT response with no reason phrase (#2032)
  • change: Add isolated NuGet package smoke tests
  • change: Avoid recursion in body structure parsing and serialization
  • change: Avoid stack overflows in client-side message threading
  • change: Avoid stack overflows in thread and envelope handling
  • change: Fix documentation warnings and update MimeKit
  • change: Normalize invalid MIME types in IMAP body structures
  • change: Rewrite ImapClientDemo using WPF and asynchronous IMAP
  • change: Update MimeKit and adapt to ContentEncoding.Unspecified
  • change: Update MimeKit and port IMAP parsing to explicit content storage
  • change: Updated MimeKit
  • change: Updated ReleaseNotes.md and MimeKit
  • change: bumped MimeKit submodule
  • change: updated to the latest MimeKit

Architecture

  • Unchanged — 1 containers · 0 contexts · 0 edges

Written by cca.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 12 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 003eca6349aad5bdca54904d8cba764eb4f37c42 — the exact code this score is about.
  • Scored under rubric-2026.11.3 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.42+preprod-6bc2a431cb25.