using (var imap = new Rebex.Net.Imap())
// connect and login to Gmail IMAP server
// get list of new messages in Inbox
var list = imap.Search(ImapSearchParameter.Unread);
// print subjects of those messages
foreach (var info in list)
Show me more code...
Mail library for C# and VB.NET developers. Provides all you need for
sending, receiving, encrypting, decrypting, signing, verifying, loading, saving and processing e-mails messages.
Why Rebex Secure Mail
Connect, log in, search for new messages, download messages, disconnect. Send email with attachments.
It's easy to start developing
with our library.
Simple code for common use cases.
SMTP and PickupDirectory for sending emails
Send a message using a single line of code. TLS/SSL support. Direct sending
to recipient's SMTP server.
IMAP for advanced mailbox access
Upload and download messages using IMAP protocol. TLS/SSL support.
Work with email folders. Multiple message operations - copy, delete, or set
flags for a range of messages in a single operation. Search for messages
with specific attributes.
POP3 for email retrieval
Retrieve messages via a simple POP3 protocol. TLS/SSL support.
Retrieve message lists with size, sequence number, unique ID or headers.
Multiple mail formats - MIME, Outlook MSG, plaintext, HTML, RTF
- Load and save MIME or RFC 822 (.eml) messages.
- Load and save Outlook (.msg) messages including formats of Outlook XP, 2003, 2007, 2010 or 2013
- Read and write Base64, Quoted-Printable, 7bit, 8bit and binary encoded messages and attachments.
- Reads messages in TNEF (winmail.dat) format, including embedded images and documents.
- RTF to HTML converter creates a HTML body for RTF-only Outlook MSG or TNEF e-mails.
Signed and encrypted emails (S/MIME)
Supports message encryption and decryption. Supports signing and signature validation. Based on X509 certificates and Cryptographic Message Syntax.
Secure communication using TLS/SSL
Keep your passwords and data secure. Using TLS/SSL to encrypt communication is as simple as it gets.
Rebex Secure Mail supports TLS 1.0, 1.1, 1.2 (as well as legacy SSL 3.0).
Login with... anything
Basic username/password authentication is often not good enough.
That's why we support additional authentication methods
such as NTLM, Kerberos (with single sign-on as well) or client certificate authentication.
2.0, 3.0, 3.5. 4.0, 4.5; both 32-bit and 64-bit editions
on Windows XP or later; Visual Studio 2005, 2008, 2010, 2012, 2013
.NET Compact Framework
2.0, 3.5, 3.9
on Windows Mobile, Windows CE, Pocket PC, PDAs and Smartphones, Windows Embedded Compact 2013; Visual Studio 2005, 2008, 2012
on Linux and Apple's OS X
Xamarin.iOS 8.6 or later
; Xamarin Studio
Xamarin.Android 4 or later
; Xamarin Studio
Supports Visual Studio 2005, 2008, 2010, 2012 and 2013.
Learn more about supported standards and platforms.
Trusted by thousands of .NET developers worldwide
Thousands of developers chose Rebex Secure Mail for adding SMTP, IMAP, POP3, MIME or S/MIME capabilities to their applications.
Many, many more time-tested features
Rebex Secure Mail is a mature and stable component maintained since 2006. We have been adding
new features year after year, inspired by user feedback. For example:
- Task-based Asynchronous API (.NET 4 or later)
- Automated (or custom) certificate validation
- Sending raw POP3/SMTP/IMAP commands
- Sending email on behalf of another user
- Logging all communication with the server
- Ability to use Secure Mail in SSIS, SQL CLR and PowerShell
- FIPS 140-2 compliant mode
And many, many more...
Hear from customers
"With Rebex IMAP library the number of support calls regarding IMAP protocol problems decreased to almost zero.
We are very happy with Rebex Secure Mail and can warmly recommend it to anybody."