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

  // get list of new messages in Inbox
  imap.SelectFolder("Inbox");
  var list = imap.Search(ImapSearchParameter.Unread);

  // print subjects of those messages
  foreach (var info in list)
  {
    Console.WriteLine(info.Subject);
  }
}
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.

Includes:

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

Platforms

  • .NET Framework
    2.0, 3.0, 3.5. 4.0, 4.5.x, 4.6.x, 4.7 (32-bit and 64-bit) on Windows XP or later; Visual Studio 2008, 2010, 2012, 2013, 2015, 2017
  • .NET Core
    1.1, 2.0 (32-bit or 64-bit) on Windows; Visual Studio 2017
  • .NET Compact Framework
    3.5, 3.9 on Windows Mobile, Windows CE, Pocket PC, Windows Embedded Compact 7, Windows Embedded Compact 2013; Visual Studio 2008, 2012, 2013
  • Mono
    3.x, 4.x, 5.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.

Support for .NET Standard 1.5/1.6/2.0 on .NET Core (experimental on .NET Framework 4.6.x.)

Experimental support for .NET Core on Linux and macOS.

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