Rebex.Mail
8.0.9797
Prefix Reserved
dotnet add package Rebex.Mail --version 8.0.9797
NuGet\Install-Package Rebex.Mail -Version 8.0.9797
<PackageReference Include="Rebex.Mail" Version="8.0.9797" />
<PackageVersion Include="Rebex.Mail" Version="8.0.9797" />
<PackageReference Include="Rebex.Mail" />
paket add Rebex.Mail --version 8.0.9797
#r "nuget: Rebex.Mail, 8.0.9797"
#:package Rebex.Mail@8.0.9797
#addin nuget:?package=Rebex.Mail&version=8.0.9797
#tool nuget:?package=Rebex.Mail&version=8.0.9797
Rebex Mail - The C# MIME and S/MIME library for .NET
Rebex Mail is a .NET library for creating, loading, saving, encrypting, decrypting, signing, and verifying email messages. It provides both a high-level MailMessage API and a low-level MIME & S/MIME API. Supports EML (MIME) and Outlook MSG formats.
Rebex Mail is the core assembly of Rebex Mail Pack. To send and receive messages, use protocol-specific packages: Rebex.Smtp, Rebex.Imap, Rebex.Pop3, Rebex.Ews, or Rebex.Graph for Microsoft 365.
20+ years of active development. Rebex Mail has been continuously developed and maintained since 2006, with regular updates and new features.
Key features
- MIME and MailMessage - create, load, save, and manipulate email messages in EML and Outlook MSG formats
- S/MIME encryption and signing - encrypt, decrypt, sign, and verify messages using X.509 certificates with RSA/OAEP, RSA/PSS, AES/GCM, ChaCha20/Poly1305
- Attachments and embedded objects - file attachments, embedded images, linked resources, embedded messages
- Outlook MSG files - read and write .MSG files with MAPI property access
- SMTP - send messages via SMTP with TLS/SSL (via Rebex.Smtp)
- IMAP - access mailboxes, search, and manage messages and folders (via Rebex.Imap)
- POP3 - download messages from a mail server (via Rebex.Pop3)
- EWS - access Microsoft Exchange mailboxes (via Rebex.Ews)
- Microsoft Graph - access Exchange Online / Microsoft 365 mailboxes (via Rebex.Graph)
- Cryptographic algorithms including PQC - ML-KEM, ML-DSA, Ed25519, ChaCha20/Poly1305, AES/GCM, ECDH, ECDSA, RSA, and more
- FIPS 140-3 compliant mode
Getting started
Create and save an email message
// create mail message
var message = new Rebex.Mail.MailMessage();
// fill some fields
message.From = "alice@example.org";
message.To = "bob@example.org";
message.Subject = "Test";
// add text and HTML bodies
message.BodyText = "This is plain-text body.";
message.BodyHtml = "This is <strong>HTML</strong> body.";
// save message in EML format
message.Save(@"C:\MyData\mail.eml");
// save message in Outlook MSG format
message.Save(@"C:\MyData\mail.msg", MailFormat.OutlookMsg);
Add attachments
// create mail
var mail = new Rebex.Mail.MailMessage();
mail.From = "alice@example.org";
mail.To = "bob@example.org";
mail.Subject = "Report";
mail.BodyText = "Please find the report attached.";
// add an attachment
mail.Attachments.Add(new Attachment(@"C:\MyData\report.pdf"));
Sign a message (S/MIME)
// create mail
var mail = new Rebex.Mail.MailMessage();
// fill some fields
// ...
// load certificate with private key
Certificate signer = Certificate.LoadPfx(@"C:\MyData\certificate.pfx", "password");
// sign the mail
mail.Sign(signer);
Encrypt a message (S/MIME)
// create mail
var mail = new Rebex.Mail.MailMessage();
// fill some fields
// ...
// load receiver's certificate (public key is enough for encryption)
Certificate recipient = Certificate.LoadDer(@"C:\MyData\ReceiverCertificate.der");
// encrypt the message
mail.Encrypt(recipient);
Validate signature and decrypt
// load a mail
var mail = new Rebex.Mail.MailMessage();
mail.Load(@"C:\MyData\mail.eml");
// validate signature
if (mail.IsSigned)
{
MailSignatureValidity result = mail.ValidateSignature();
Console.WriteLine(result.Valid ? "Signature is valid." : "Signature is not valid.");
}
// decrypt
if (mail.IsEncrypted && mail.CanDecrypt)
{
mail.Decrypt();
}
Embed images into HTML messages
// create mail
var mail = new Rebex.Mail.MailMessage();
mail.From = "alice@example.org";
mail.To = "bob@example.org";
mail.Subject = "Report with chart";
// generate a content ID for the image
string imageId = "chart001@example.org";
// add HTML body with embedded image reference
mail.BodyHtml = string.Format("See the chart: <img src='cid:{0}'/>", imageId);
// add image to linked resources
var resource = new LinkedResource(@"C:\MyData\chart.jpg", MediaTypeNames.Image.Jpeg);
resource.ContentId = imageId;
mail.Resources.Add(resource);
Send a message via SMTP (Rebex.Smtp)
using (var smtp = new Rebex.Net.Smtp())
{
smtp.Connect(hostname, SslMode.Explicit);
smtp.Login(username, password);
smtp.Send(sender, recipient, "Test", "Hello World!");
smtp.Disconnect();
}
Download messages via IMAP (Rebex.Imap)
using (var imap = new Rebex.Net.Imap())
{
imap.Connect("imap.example.org", SslMode.Implicit);
imap.Login(username, password);
imap.SelectFolder("INBOX");
// get list of unread messages
ImapMessageCollection list = imap.Search(ImapSearchParameter.Unread);
foreach (ImapMessageInfo info in list)
{
Console.WriteLine("From: {0}, Subject: {1}", info.From, info.Subject);
}
imap.Disconnect();
}
Download messages via POP3 (Rebex.Pop3)
using (var pop3 = new Rebex.Net.Pop3())
{
pop3.Connect("pop.example.org", SslMode.Implicit);
pop3.Login(username, password);
Pop3MessageCollection list = pop3.GetMessageList();
foreach (Pop3MessageInfo info in list)
{
MailMessage mail = pop3.GetMailMessage(info.SequenceNumber);
// process the mail ...
}
pop3.Disconnect();
}
Access Exchange via EWS (Rebex.Ews)
using (var client = new Rebex.Net.Ews())
{
client.Connect(hostname, SslMode.Implicit);
client.Login(username, password);
// get list of unread messages
var list = client.Search(
EwsFolderId.Inbox,
EwsSearchParameter.IsRead(false));
foreach (EwsMessageInfo info in list)
{
Console.WriteLine("From: {0}, Subject: {1}", info.From, info.Subject);
}
client.Disconnect();
}
Access Microsoft 365 via Graph (Rebex.Graph)
using (var client = new Rebex.Net.GraphClient())
{
client.Connect();
client.Login(token);
// get list of unread messages from Inbox
var unread = GraphMessageSearchParameter.IsRead(false);
GraphMessageCollection messages = client.Search(GraphFolderId.Inbox, unread);
foreach (GraphMessageInfo info in messages)
{
Console.WriteLine("From: {0}, Subject: {1}", info.From, info.Subject);
}
client.Disconnect();
}
Supported platforms
- .NET 10 on Windows, Linux, macOS, Android, iOS/tvOS
- .NET 9 on Windows, Linux, macOS, Android, iOS/tvOS
- .NET 8 on Windows, Linux, macOS, Android, iOS/tvOS
- .NET 7 on Windows, Linux, macOS, Android, iOS/tvOS
- .NET 6 on Windows, Linux, macOS
- .NET 5 on Windows, Linux, macOS
- .NET Framework 4.0, 4.5.x, 4.6.x, 4.7.x, 4.8.x
- .NET Framework 3.5 SP1
- .NET Core 3.1 on Windows, Linux, macOS
- Xamarin.Android (10.1 and higher; via .NET Standard 2.1)
- Xamarin.iOS (13.10 and higher; via .NET Standard 2.1)
- Mono 6.0 or higher on Linux and macOS
Supported architectures: x86, x64, AMD64.
Licensing
This is a paid commercial product with a free 30-day trial.
- Trial mode: Start your free 30-day trial by generating your trial key
- Licensed mode: Buy Rebex Mail Pack and get your full license key
When the full license key is provided, NuGet.org repository can be used to retrieve versions of Rebex components covered by your support contract.
Support
Talk to real people. No scripted or AI responses. Support is provided directly by the engineers who design and build the library.
Email us at support@rebex.net or visit rebex.net/support.
Documentation
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
| .NET Framework | net35 is compatible. net40 is compatible. net403 was computed. net45 was computed. net451 was computed. net452 was computed. net46 is compatible. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Rebex.Common (= 8.0.9797)
-
.NETFramework 3.5
- Rebex.Common (= 8.0.9797)
-
.NETFramework 4.0
- Rebex.Common (= 8.0.9797)
-
.NETFramework 4.6
- Rebex.Common (= 8.0.9797)
-
.NETStandard 2.0
- Rebex.Common (= 8.0.9797)
-
.NETStandard 2.1
- Rebex.Common (= 8.0.9797)
-
net10.0
- Rebex.Common (= 8.0.9797)
-
net5.0
- Rebex.Common (= 8.0.9797)
-
net6.0
- Rebex.Common (= 8.0.9797)
-
net7.0
- Rebex.Common (= 8.0.9797)
-
net8.0
- Rebex.Common (= 8.0.9797)
-
net9.0
- Rebex.Common (= 8.0.9797)
NuGet packages (8)
Showing the top 5 NuGet packages that depend on Rebex.Mail:
| Package | Downloads |
|---|---|
|
Rebex.TotalPack
Rebex Total Pack is a metapackage that includes all Rebex libraries such as Rebex SFTP, Rebex FTP, Rebex SSH Shell, and more. See https://www.rebex.net/total-pack/ for a complete list. This is a paid commercial product with a free 30-day trial: - Trial mode: Start your free 30-day trial by generating your trial key at https://rebex.net/support/trial-key.aspx - Licensed mode: Purchase the product at https://rebex.net/shop/ and get your full license key at https://rebex.net/protected/nuget When the full license key is provided, NuGet.org repository can be used to retrieve versions of Rebex components covered by your support contract. Supported platforms: - .NET 10 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 9 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 8 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 7 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 6 on Windows, Linux, macOS - .NET 5 on Windows, Linux, macOS - .NET Framework 4.0, 4.5.x, 4.6.x, 4.7.x, 4.8.x - .NET Framework 3.5 SP1 - .NET Core 3.1 on Windows, Linux, macOS - Xamarin.Android (10.1 and higher; via .NET Standard 2.1) - Xamarin.iOS (13.10 and higher; via .NET Standard 2.1) - Mono 6.0 or higher on Linux and macOS |
|
|
Rebex.Smtp
Rebex.Smtp is part of Rebex Mail Pack - a set of mail libraries that provide all you need for sending, receiving, encrypting, decrypting, signing, verifying, loading, saving and processing e-mail messages. Includes IMAP, EWS (Exchange Web Services), POP3 and SMTP clients; a high-level MailMessage API and a low-level MIME & S/MIME API. This is a paid commercial product with a free 30-day trial: - Trial mode: Start your free 30-day trial by generating your trial key at https://rebex.net/support/trial-key.aspx - Licensed mode: Purchase the product at https://rebex.net/shop/ and get your full license key at https://rebex.net/protected/nuget When the full license key is provided, NuGet.org repository can be used to retrieve versions of Rebex components covered by your support contract. Supported platforms: - .NET 10 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 9 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 8 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 7 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 6 on Windows, Linux, macOS - .NET 5 on Windows, Linux, macOS - .NET Framework 4.0, 4.5.x, 4.6.x, 4.7.x, 4.8.x - .NET Framework 3.5 SP1 - .NET Core 3.1 on Windows, Linux, macOS - Xamarin.Android (10.1 and higher; via .NET Standard 2.1) - Xamarin.iOS (13.10 and higher; via .NET Standard 2.1) - Mono 6.0 or higher on Linux and macOS |
|
|
Rebex.Imap
Rebex.Imap is part of Rebex Mail Pack - a set of mail libraries that provide all you need for sending, receiving, encrypting, decrypting, signing, verifying, loading, saving and processing e-mail messages. Includes IMAP, EWS (Exchange Web Services), POP3 and SMTP clients; a high-level MailMessage API and a low-level MIME & S/MIME API. This is a paid commercial product with a free 30-day trial: - Trial mode: Start your free 30-day trial by generating your trial key at https://rebex.net/support/trial-key.aspx - Licensed mode: Purchase the product at https://rebex.net/shop/ and get your full license key at https://rebex.net/protected/nuget When the full license key is provided, NuGet.org repository can be used to retrieve versions of Rebex components covered by your support contract. Supported platforms: - .NET 10 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 9 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 8 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 7 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 6 on Windows, Linux, macOS - .NET 5 on Windows, Linux, macOS - .NET Framework 4.0, 4.5.x, 4.6.x, 4.7.x, 4.8.x - .NET Framework 3.5 SP1 - .NET Core 3.1 on Windows, Linux, macOS - Xamarin.Android (10.1 and higher; via .NET Standard 2.1) - Xamarin.iOS (13.10 and higher; via .NET Standard 2.1) - Mono 6.0 or higher on Linux and macOS |
|
|
Rebex.Ews
Rebex.Ews is part of Rebex Mail Pack - a set of mail libraries that provide all you need for sending, receiving, encrypting, decrypting, signing, verifying, loading, saving and processing e-mail messages. Includes IMAP, EWS (Exchange Web Services), POP3 and SMTP clients; a high-level MailMessage API and a low-level MIME & S/MIME API. This is a paid commercial product with a free 30-day trial: - Trial mode: Start your free 30-day trial by generating your trial key at https://rebex.net/support/trial-key.aspx - Licensed mode: Purchase the product at https://rebex.net/shop/ and get your full license key at https://rebex.net/protected/nuget When the full license key is provided, NuGet.org repository can be used to retrieve versions of Rebex components covered by your support contract. Supported platforms: - .NET 10 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 9 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 8 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 7 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 6 on Windows, Linux, macOS - .NET 5 on Windows, Linux, macOS - .NET Framework 4.0, 4.5.x, 4.6.x, 4.7.x, 4.8.x - .NET Framework 3.5 SP1 - .NET Core 3.1 on Windows, Linux, macOS - Xamarin.Android (10.1 and higher; via .NET Standard 2.1) - Xamarin.iOS (13.10 and higher; via .NET Standard 2.1) - Mono 6.0 or higher on Linux and macOS |
|
|
Rebex.Pop3
Rebex.Pop3 is part of Rebex Mail Pack - a set of mail libraries that provide all you need for sending, receiving, encrypting, decrypting, signing, verifying, loading, saving and processing e-mail messages. Includes IMAP, EWS (Exchange Web Services), POP3 and SMTP clients; a high-level MailMessage API and a low-level MIME & S/MIME API. This is a paid commercial product with a free 30-day trial: - Trial mode: Start your free 30-day trial by generating your trial key at https://rebex.net/support/trial-key.aspx - Licensed mode: Purchase the product at https://rebex.net/shop/ and get your full license key at https://rebex.net/protected/nuget When the full license key is provided, NuGet.org repository can be used to retrieve versions of Rebex components covered by your support contract. Supported platforms: - .NET 10 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 9 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 8 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 7 on Windows, Linux, macOS, Android, iOS/tvOS - .NET 6 on Windows, Linux, macOS - .NET 5 on Windows, Linux, macOS - .NET Framework 4.0, 4.5.x, 4.6.x, 4.7.x, 4.8.x - .NET Framework 3.5 SP1 - .NET Core 3.1 on Windows, Linux, macOS - Xamarin.Android (10.1 and higher; via .NET Standard 2.1) - Xamarin.iOS (13.10 and higher; via .NET Standard 2.1) - Mono 6.0 or higher on Linux and macOS |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.0.9797 | 727 | 10/28/2026 |
| 8.0.9709 | 72,381 | 8/3/2026 |
| 8.0.9673 | 12,815 | 6/25/2026 |
| 8.0.9663 | 1,058 | 6/24/2026 |
| 8.0.9643-rc.4 | 202 | 5/27/2026 |
| 8.0.9531-rc.3 | 204 | 2/4/2026 |
| 8.0.9440-rc.2 | 291 | 11/5/2025 |
| 8.0.9392-rc.1 | 322 | 9/19/2025 |
| 7.0.9796 | 183 | 10/28/2026 |
| 7.0.9649 | 738 | 6/23/2026 |
| 7.0.9561 | 184,588 | 3/6/2026 |
| 7.0.9448 | 58,290 | 11/12/2025 |
| 7.0.9391 | 23,245 | 9/17/2025 |
| 7.0.9313 | 18,489 | 6/30/2025 |
| 7.0.9209 | 73,950 | 3/20/2025 |
| 7.0.9147 | 34,512 | 1/16/2025 |
| 7.0.9119 | 5,929 | 12/19/2024 |
| 7.0.9083 | 12,925 | 11/13/2024 |
| 6.0.9280 | 3,638 | 6/30/2025 |
| 6.0.9082 | 6,792 | 11/13/2024 |