Rebex



Rebex Secure Mail IMAP Features

IMAP is a powerful protocol for managmenent of e-mail stored on a remote server. It has support for a tree-like folder structure, message flags, searching and message uploading as well as downloading. IMAP is supported by most mail servers either out-of-the-box or through a supporting service.

Message management features

  • Download mail as an instance of MailMessage or MimeMessage.
  • Download mail to a disk file or stream.
  • Download message headers without the body.
  • Upload a simple message using a single line of code.
  • Upload mail from a disk file or stream.
  • Upload any MailMessage or MimeMessage instance (arbitrary number of body views, attachments, ...)
  • Retrieve message list filled with the specified info, such as size, sequence number, received date, flags, unique ID, message plain/HTML bodies, common headers or full headers.
  • Delete messages.
  • Copy messages.
  • Mark/unmark message flags such as seen/unseen, answered/unanswered, draft, or flagged.
  • Multiple message operations - copy, delete, or set flags for a range of messages in a single operation.
  • IMAP over TLS/SSL, both implicit and explicit security.

Folder management features

  • Create folders.
  • Rename folders.
  • Delete folders.
  • Subscribe and Unsubscribe folders.
  • Select and unselect folders.

More features

  • Powerful message searching capabilities - search for text, flags, and more.
  • Automatically detects and uses supported IMAP extensions.
  • Both synchronous and asynchronous operations. Designed according to .NET Framework asynchronous operations design patterns.
  • Support for asynchronous operations including .NET 4.x-style task-based API.
  • Authentication to the IMAP server.
  • Events can be raised when command is sent, response is receiving or data is transferred.
  • Partial message download (can be used to implement resumable message download) with stream support.
  • Events can be raised when a notification message is received from the server.
  • Custom commands.
  • Proxy support.
  • Set keywords for uploaded messages.
  • UIDPLUS IMAP extensions support which enables to return list of copied messages.
  • Delete messages.
  • Purge (permanently remove) messages marked as deleted.
  • Purge list of messages (when server supports UIDPLUS extension).
  • FIPS compliant mode in which only FIPS-approved modules are used.
  • Compatible with both state-of-the-art IMAP4rev1 and legacy IMAP4 servers.
  • Compliant with RFC 3501, 2683, 2359, 1321, etc.

Supported authentication methods

  • Auto - automatically choose the best method available.
  • Plain - RFC 2595 plaintext authentication.
  • NTLM - Integrated Microsoft Windows Authentication.
  • SPNEGO/Negotiate (GSSAPI) - Integrated Microsoft Windows Authentication.
  • Digest-MD5 - RFC 2831 DIGEST-MD5 authentication.
  • CRAM-MD5 - RFC 2195 CRAM-MD5 authentication.
  • Login - 'LOGIN' plaintext authentication.
  • ClearText - Legacy plaintext LOGIN command.
  • External - RFC 4422 - if the client already established its credentials via external means

Sample usage

This sample demonstrates checking for new mail in an IMAP folder.

C#

using Rebex.Net;
using Rebex.Mail;

MailMessage message = new MailMessage();
msg.Load(@"c:\temp\message.eml");

Console.Write(
  "Sending mail from '{0}' to '{1}' with subject '{2}'"
  message.From,
  message.To,
  message.Subject
);

Smtp.Send(message, "smtp.example.org");

VB.NET

Imports Rebex.Net
Imports Rebex.Mail

Dim message As New MailMessage
msg.Load("c:\temp\message.eml")

Console.Write( _
  "Sending mail from '{0}' to '{1}' with subject '{2}'" _
  message.From, _
  message.To, _
  message.Subject)

What next?