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.

Signed and encrypted emails (S/MIME)

Supports message encryption and decryption. Supports signing and signature validation. Based on X.509 certificates and Cryptographic Message Syntax.

RSA/OAEP and RSA/PSS on all platforms

Use RSASSA-PSS signatures and RSAES-OAEP encryption with SHA-1, SHA-256, SHA-384 or SHA-512 on all supported platforms including .NET Framework 2.0 and .NET Compact Framework.

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.

Secure communication using TLS/SSL

Keep your passwords and data secure. Using TLS/SSL to encrypt communication is as simple as it gets.

Supported features include:

  • TLS 1.2, 1.1, 1.0
  • AES/GCM ciphers
  • Elliptic Curve DSA and Elliptic Curve Diffie-Hellman ciphers
    (requires plugin on some platforms)
  • SHA-2 certificates
  • SHA-2 hashing algorithms
  • Server Name Indication (SNI) extension
  • Renegotiation Indication extension
  • Support for legacy SSL 3.0 protocol

Multiple mail formats - MIME, Outlook MSG, plaintext, HTML, RTF

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, 3.5 SP1, 4.0, 4.5.x, 4.6.x, 4.7.x, 4.8 (32-bit and 64-bit) on Windows
  • .NET Core
    1.1, 2.1, 2.2 (32-bit or 64-bit) on Windows, Linux and macOS
  • .NET Compact Framework
    3.5, 3.9 on Windows Mobile, Windows CE, Pocket PC, Windows Embedded Compact 7, Windows Embedded Compact 2013
  • Mono
    4.x, 5.x on Linux and Apple macOS (OS X)
  • Xamarin.iOS
    Xamarin.iOS 10.3 or later
  • Xamarin.Android
    Xamarin.Android 8.0 or later

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

Supports .NET Standard on .NET Core.

Experimental support for Universal Windows Platform on Windows 10 and Windows 10 IoT.

Experimental support for Xamarin.Mac 3.8 and higher.

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