More .NET components
using (var imap = new Rebex.Net.Imap())
  // connect and login to Gmail IMAP server
  imap.Connect("", SslMode.Implicit);
  imap.Login(username, password);

  // 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

Easy-to-use API

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.

EWS for sending and receiving emails using Exchange

Upload and download messages using Exchange Web Services. 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. Send emails using EWS.

POP3 for email retrieval

Retrieve messages using 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

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.

Getting started


  • .NET Framework
    2.0, 3.0, 3.5. 4.0, 4.5.x, 4.6.x; both 32-bit and 64-bit editions on Windows XP or later; Visual Studio 2008, 2010, 2012, 2013, 2015, 2017
  • .NET Compact Framework
    2.0, 3.5, 3.9 on Windows Mobile, Windows CE, Pocket PC, Windows Embedded Compact 2013; Visual Studio 2008, 2012, 2013
  • Mono
    3.x, 4.x on Linux and Apple macOS (OS X)
  • Xamarin.iOS
    Xamarin.iOS 8.6 or later; Xamarin Studio
  • Xamarin.Android
    Xamarin.Android 4 or later; Xamarin Studio

Supports Visual Studio 2008, 2010, 2012, 2013, 2015 and 2017.

Experimental support for Universal Windows Platform (Windows 10, Windows 10 Mobile, Windows 10 IoT).

Experimental support for Xamarin.Mac platform (assemblies are suitable for Xamarin.Mac Mobile and Xamarin.Mac .NET 4.5 Framework projects).

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."

Stefan Schultze
MailStore Software
See more...