MailKit 2.12.0

MailKit is an Open Source cross-platform .NET mail-client library that is based on MimeKit and optimized for mobile devices.

Features include:
* HTTP, Socks4, Socks4a and Socks5 proxy support.
* SASL Authentication via CRAM-MD5, DIGEST-MD5, LOGIN, NTLM, OAUTHBEARER, PLAIN, SCRAM-SHA-1, SCRAM-SHA-256, SCRAM-SHA-512 and XOAUTH2.
* A fully-cancellable SmtpClient with support for STARTTLS, 8BITMIME, BINARYMIME, ENHANCEDSTATUSCODES, SIZE, DSN, PIPELINING and SMTPUTF8.
* A fully-cancellable Pop3Client with support for STLS, UIDL, APOP, PIPELINING, UTF8, and LANG.
* A fully-cancellable ImapClient with support for ACL, QUOTA, LITERAL+, IDLE, NAMESPACE, ID, CHILDREN, LOGINDISABLED, STARTTLS, MULTIAPPEND, UNSELECT, UIDPLUS, CONDSTORE, ESEARCH, SASL-IR, COMPRESS, WITHIN, ENABLE, QRESYNC, SORT, THREAD, ANNOTATE, LIST-EXTENDED, ESORT, METADATA / METADATA-SERVER, NOTIFY, FILTERS, LIST-STATUS, SORT=DISPLAY, SPECIAL-USE / CREATE-SPECIAL-USE, SEARCH=FUZZY, MOVE, UTF8=ACCEPT / UTF8=ONLY, LITERAL-, APPENDLIMIT, STATUS=SIZE, OBJECTID, REPLACE, SAVEDATE, XLIST, and X-GM-EXT1.
* Client-side sorting and threading of messages (the Ordinal Subject and the Jamie Zawinski threading algorithms are supported).
* Asynchronous versions of all methods that hit the network.
* S/MIME, OpenPGP, DKIM and ARC support via MimeKit.
* Microsoft TNEF support via MimeKit.

There is a newer version of this package available.
See the version list below for details.

Requires NuGet 2.12 or higher.

Install-Package MailKit -Version 2.12.0
dotnet add package MailKit --version 2.12.0
<PackageReference Include="MailKit" Version="2.12.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MailKit --version 2.12.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MailKit, 2.12.0"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install MailKit as a Cake Addin
#addin nuget:?package=MailKit&version=2.12.0

// Install MailKit as a Cake Tool
#tool nuget:?package=MailKit&version=2.12.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

* Fixed the .NET 5.0 build to include .NET 5.0-specific features. Previous releases incorrectly used #if NET50 instead of #if NET5_0. (issue #1140)
* Added support for NETStandard 2.1. (issue #1181)
* .NETStandard 2.1 and .NET 5.0 versions of MailKit now use the newer SslStream.AuthenticateAsClientAsync() methods that take SslClientAuthenticationOptions and CancellationToken arguments. In theory, this should make upgrading a TCP/IP connection to SSL/TLS cancellable. Older .NET frameworks remain uncancellable for this operation.
* Fixed a NullReferenceException bug in the NTLM SASL mechanism logic.
* Updated hard-coded SSL certificate serial numbers and fingerprints for common mail servers.

API Changes Since 2.0.x:

* Obsoleted SearchQuery.HasCustomFlags() and SearchQuery.DoesNotHaveCustomFlags(). These are now SearchQuery.HasKeywords() and SearchQuery.NotKeywords(), respectively.
* Obsoleted SearchQuery.DoesNotHaveFlags() in favor of SearchQuery.NotFlags().
* Obsoleted the IMessageSummary.UserFlags property in favor of IMessageSummary.Keywords.
* Obsoleted the MessageFlagsChangedEventArgs.UserFlags property in favor of MessageFlagsChangedEventArgs.Keywords.
* All IMailFolder.Fetch and IMailFolder.FetchAsync methods that took a HashSet<string> userFlags argument now take an IEnumerable<string> keywords argument. Note: this only affects you if your code used named method parameters (e.g. userFlags: myUserFlags).

Note to users upgrading from MailKit 1.x:

In order to authenticate using the XOAUTH2 SASL mechanism, you must now use the following approach:

client.Authenticate (new SaslMechanismOAuth2 (username, auth_token));

  • .NETFramework 4.5

  • .NETFramework 4.6

  • .NETFramework 4.7

  • .NETFramework 4.8

  • .NETStandard 2.0

  • .NETStandard 2.1

  • net5.0

NuGet packages (389)

Showing the top 5 NuGet packages that depend on MailKit:

Package Downloads
Serilog.Sinks.Email
The email sink for Serilog
NETCore.MailKit
MailKit extension for asp.net core. Easy send email in asp.net core project.
Abp.MailKit
Abp.MailKit
NLog.MailKit
NLog Mail Target for .NET Core & .NET Standard, and .NET 4.5+ using MailKit. This package add the mail target to NLog and has the same options* as the original Mail Target. If the mail target was already available on your platform (.NET Standard 2+, .NET 4.5), this package will overwrite the original Mail Target. * Compared to the original MailTarget, the following options aren't implemented: - PickupDirectory - NTLM auth * MailKit gives more control of the sockets, so you get the `secureSocketOption` option for free!
OElite.Web
OElite Web API SDK for OElite Platform based application development

GitHub repositories (58)

Showing the top 5 popular GitHub repositories that depend on MailKit:

Repository Stars
aspnetboilerplate/aspnetboilerplate
ASP.NET Boilerplate - Web Application Framework
bitwarden/server
The core infrastructure backend (API, database, Docker, etc).
Sonarr/Sonarr
Smart PVR for newsgroup and bittorrent users.
nopSolutions/nopCommerce
The most popular open-source eCommerce shopping cart solution based on ASP.NET Core
abpframework/abp
Open Source Web Application Framework for ASP.NET Core

Version History

Version Downloads Last updated
2.13.0 13,634 6/12/2021
2.12.0 161,062 5/12/2021
2.11.1 460,176 3/16/2021
2.11.0 29,851 3/12/2021
2.10.1 832,102 1/2/2021
2.10.0 656,847 11/21/2020
2.9.0 1,177,994 9/12/2020
2.8.0 1,156,778 7/11/2020
2.7.0 893,796 5/30/2020
2.6.0 1,688,306 4/4/2020
2.5.2 396,214 3/14/2020
2.5.1 592,516 2/15/2020
2.5.0 489,006 1/18/2020
2.4.1 1,033,845 11/10/2019
2.4.0.1 79,380 11/5/2019
2.4.0 12,849 11/3/2019
2.3.2 252,924 10/12/2019
2.3.1.6 632,922 9/9/2019
2.3.1 56,073 9/8/2019
2.3.0 438,246 8/24/2019
2.2.0 1,286,740 6/11/2019
2.1.5.1 464,671 5/13/2019
2.1.4 342,472 4/13/2019
2.1.3 681,932 2/24/2019
2.1.2 713,866 12/30/2018
2.1.1 139,056 12/17/2018
2.1.0.3 98,929 12/7/2018
2.0.7 301,168 10/28/2018
2.0.6 883,626 8/4/2018
2.0.5 272,409 7/7/2018
2.0.4 377,709 5/25/2018
2.0.3 363,399 4/15/2018
2.0.2 123,065 3/18/2018
2.0.1 892,470 1/6/2018
2.0.0 77,227 12/22/2017
1.22.0 301,701 11/24/2017
1.20.0 233,442 10/28/2017
1.18.1.1 493,991 9/4/2017
1.18.1 11,845 9/3/2017
1.18.0 139,107 8/7/2017
1.16.2 355,177 7/1/2017
1.16.1 357,328 5/5/2017
1.16.0 73,014 4/21/2017
1.14.2 39,152 4/12/2017
1.12.0 120,463 3/12/2017
1.10.2 120,690 1/28/2017
1.10.1 154,936 12/4/2016
1.10.0 392,683 10/31/2016