Mail.dll - .NET email component (IMAP, POP3, S/MIME)
Mail.dll is a powerful .NET IMAP component and POP3 component designed for developers who need to receive and process emails in their .NET applications. This comprehensive library includes a robust SMTP component for reliable email sending.
With Mail.dll, you can sign and encrypt emails using the S/MIME standard, ensuring secure communication. The component also supports signature verification and decryption, providing a full suite of tools for handling email security in received messages.
Enhance your .NET applications with Mail.dll for efficient and secure e-mail processing.
The library fully supports async/await API for building scalable and responsive applications.
Written entirely in managed code. Mail.dll only requires the .NET be installed on the machine.
It supports both C# and VB.NET languages. Works with .NET framework 2.0-4.8, .NET Core 2.0+, .NET Standard 2.0+, .NET 5.0/.NET 8.0 and newer including ASP.NET Core and Azure.
Mail.dll features
- .NET IMAP client for receiving emails, .NET POP3 client for receiving emails
- .NET SMTP client for sending emails in a single package
- UNIQUE Email component includes most reliable MIME parser on the market
- UNIQUE Covered with 6 000+ unit and integration tests
- Fully compatible with Microsoft Exchange (all versions), Office 365, Gmail, Dovecot, hMailServer and others
- SSL/TLS (incl. TLS 1.2 and TLS 1.3) are supported
- Automatic email attachment encoding and decoding
- S/MIME: sending signed emails, sending encrypted emails
- S/MIME: received signed emails validation, received emails decryption
- UNIQUE Received emails DKIM validation and signing
- UNIQUE Full support of iCalendar appointments and vCards
- Outlook .msg files processing and .msg to MIME converter
- TNEF support (decode winmail.dat files automatically)
- Easily create and save attachments using a file or byte array
- Secure login (APOP, CRAM-MD5, DIGEST-MD5 support)
- Proxy support: HTTP and Socks proxy (Socks5, Socks4, Socks4a)
- IMAP IDLE: push email support for IMAP client
- UNIQUE Includes an easy to use template engine
- Support for displaying emails in Windows applications
- UNIQUE OAuth 2.0 for web sites (ASP.NET) and OAuth 2.0 for installed applications support
- UNIQUE IMAP protocol Gmail extensions
- Bounce handling for emails received with IMAP and POP3
- Bayesian anti-spam filter (over 99.5% accuracy)
- UNIQUE Build-in HTML email to plain text email converter
Clients about Mail.dll
Just bought a license. Mail.dll is an absolutely fantastic email library. I would recommend it to anyone who needs to send or receive emails from .NET applications
I like your product. I should also recognize the excellent technical support you provide; my questions were always promptly answered, and the answers were very helpful every time.
I’ve installed 4 or so other email components from other vendors, played with each of them to see how easy they are to work with, and yours was up and running quicker, easier, and better than all the others.
Quick start .NET samples
Receive emails using IMAP in .NET
using(Imap imap = new Imap()) { imap.ConnectSSL("imap.server.com"); imap.UseBestLogin("user", "pass"); imap.SelectInbox(); List<long> uids = imap.Search( Flag.Unseen); long first = uids[0]; byte[] eml = imap .GetMessageByUID(first); IMail email = new MailBuilder() .CreateFromEml(eml); string subject = email.Subject; imap.Close(); }
Receive emails using POP3 in .NET
using(Pop3 pop3 = new Pop3()) { pop3.ConnectSSL("imap.server.com"); pop3.UseBestLogin("user", "pass"); List<long> uids = pop3.GetAll(); long first = uids[0]; byte[] eml = pop3 .GetMessageByUID(first); IMail email = new MailBuilder() .CreateFromEml(eml); string subject = email.Subject; pop3.Close(); }
-
Receive emails using IMAP with C# .NET client
using(Imap imap = new Imap()) { imap.ConnectSSL("imap.server.com"); // or Connect for non SSL/TLS imap.UseBestLogin("user", "password"); imap.SelectInbox(); List<long> uids = imap.Search(Flag.Unseen); foreach (long uid in uids) { IMail email = new MailBuilder() .CreateFromEml(imap.GetMessageByUID(uid)); string subject = mail.Subject; } imap.Close(); }
-
Receive emails using POP3 with C# .NET client
-
Send emails using SMTP with C# .NET client
-
Receive emails using POP3 with VB.NET client
Using imap As New Imap imap.ConnectSSL("imap.server.com") ' or Connect for non SSL/TLS imap.UseBestLogin("user", "password") imap.SelectInbox() Dim uidList As List(Of Long) = imap.Search(Flag.Unseen) For Each uid As Long In uidList Dim email As IMail = New MailBuilder() _ .CreateFromEml(imap.GetMessageByUID(uid)) Dim subject As String = email.Subject Next imap.Close() End Using
-
Receive emails using POP3 with VB.NET client
-
Send emails using SMTP with VB.NET client
You can find many more .NET email client samples here.