Mail.dll - IMAP .NET component
Enhance your .NET applications in C# and VB.NET with the powerful IMAP .NET client component integrated into cutting-edge Mail.dll email toolkit.
Seamlessly receive and process emails using the IMAP protocol, with support for signature verification and decryption. Our IMAP client is crafted entirely in managed code, ensuring optimal performance.
Compatible with a wide range of frameworks, including .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. Upgrade your email functionality with ease and efficiency using Mail.dll's IMAP client component.
IMAP client features
- UNIQUE Robust IMAP client plus POP3 and SMTP clients in a single library
- Manage folders, search, flag, upload, copy messages
- IMAP protocol allows getting most common email data fast
- UNIQUE Email component includes most reliable MIME parser on the market
- Fully compatible with all IMAP servers:
Microsoft Exchange, Office 365, Gmail, Dovecot, hMailServer and others - IMAP SSL/TLS support
- IMAP client TLS 1.2 and TLS 1.3 support
- Automatic email attachment encoding/decoding
- S/MIME: IMAP received signed emails validation, IMAP received emails decryption
- UNIQUE Received DKIM emails validation
- UNIQUE iCalendar appointments and vCard support
- TNEF support (decodes winmail.dat files)
- Proxy support: IMAP over HTTP and Socks proxy (Socks5, Socks4, Socks4a)
- IMAP IDLE: push email support for IMAP client
- UNIQUE IMAP OAuth 2.0 for web sites (ASP.NET) and IMAP OAuth 2.0 for installed applications support
- UNIQUE Supports Gmail extensions for IMAP
- Bounce handling for emails received with IMAP
- Bayesian spam filter (over 99.5% accuracy)
- UNIQUE Build-in HTML e-mail to plain text e-mail converter
Clients about IMAP in Mail.dll
I wanted to drop a short note to you to say hi, just bought a license, and thanks for writing and publishing what is so far the best IMAP tool I’ve found. And I’ve installed 4 or so other components from other vendors.
First let me say: great piece of work. I ordered a license of Mail.dll for fetching Mails via IMAP last week.
I just discovered your product and have installed the trial version. I must say, I am loving how easy it is to work with. Previously I had been using another product and had to do much of the grunt work your product already does for me!
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 IMAP client samples here.