MimeKit is a .NET library for creating and parsing email and MIME messages per IETF MIME specifications. It pairs with MailKit for SMTP, POP3, and IMAP when sending and receiving mail.
Overview
MimeKit focuses on correct MIME handling where many mail clients and servers produce imperfect messages. It exposes a high-level API for loading messages from streams or files, walking multipart trees, and reading bodies while respecting Content-Disposition and related conventions.
The parser works on byte buffers with pooling and lazy header decoding, and can stream large messages and multi-gigabyte mbox files. Optional cryptography packages add S/MIME and OpenPGP encryption, signing, and verification, plus DKIM, ARC, and DMARC support.
Helpers convert between HTML, plain text, enriched text, and RTF, decode TNEF winmail.dat attachments, and build messages with attachments or a body builder. Packages split core parsing from cryptography features so projects without signing needs can reference a smaller dependency set.
Installation is via NuGet on modern .NET targets. Documentation covers compliance checks, digital signatures, and integration patterns alongside MailKit for full send-and-receive workflows.
Key features
- MIME message parse and create
- Unix mbox stream parsing
- S/MIME and PGP/MIME crypto
- DKIM, ARC, and DMARC support
- TNEF and RTF body handling
- HTML and plain text converters
- Streaming large mailbox files
- NuGet core and cryptography packages
Use cases
- Email client development
- MIME parsing in services
- Signed and encrypted mail
- Mailbox import and analysis
- Mail pipeline preprocessing