Aspose.Email.Foss
26.7.0
Prefix Reserved
dotnet add package Aspose.Email.Foss --version 26.7.0
NuGet\Install-Package Aspose.Email.Foss -Version 26.7.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Aspose.Email.Foss" Version="26.7.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aspose.Email.Foss" Version="26.7.0" />
<PackageReference Include="Aspose.Email.Foss" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aspose.Email.Foss --version 26.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Aspose.Email.Foss, 26.7.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Aspose.Email.Foss@26.7.0
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aspose.Email.Foss&version=26.7.0
#tool nuget:?package=Aspose.Email.Foss&version=26.7.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Aspose.Email FOSS for .NET
Aspose.Email FOSS for .NET is a dependency-free C# library for working with:
- Compound File Binary (CFB) containers
- Outlook MSG files
- High-level mutable message objects
- EML parsing and serialization through an in-repository MIME implementation
The package is designed for deterministic binary and message processing without external runtime dependencies.
Main Namespaces
Aspose.Email.Foss.CfbAspose.Email.Foss.Msg
Features
- Read and write CFB containers through
CfbReaderandCfbWriter - Read and write MSG documents through
MsgReader,MsgWriter, andMsgDocument - Create, edit, save, and reload high-level messages through
MapiMessage - Load
.emlintoMapiMessagewithMapiMessage.LoadFromEml - Save
MapiMessageback to.emlwithMapiMessage.SaveToEml - Work with recipients, regular attachments, and embedded message attachments
Install
dotnet add package Aspose.Email.Foss
Quick Start
Read a subject from an MSG file:
using System.IO;
using Aspose.Email.Foss.Msg;
using var stream = File.OpenRead("sample.msg");
var message = MapiMessage.FromStream(stream);
Console.WriteLine(message.Subject);
Create and save a message:
using System.IO;
using Aspose.Email.Foss.Msg;
var message = MapiMessage.Create("Hello", "Body");
message.SenderName = "Alice";
message.SenderEmailAddress = "alice@example.com";
message.AddRecipient("bob@example.com", "Bob");
using var attachmentStream = new MemoryStream("abc"u8.ToArray());
message.AddAttachment("note.txt", attachmentStream, "text/plain");
using var output = File.Create("hello.msg");
message.Save(output);
Bridge between EML and MSG:
using System.IO;
using Aspose.Email.Foss.Msg;
using var input = File.OpenRead("message.eml");
var message = MapiMessage.LoadFromEml(input);
using var msgOutput = File.Create("message.msg");
message.Save(msgOutput);
using var emlOutput = File.Create("roundtrip.eml");
message.SaveToEml(emlOutput);
Build And Test
dotnet build csharp/src/Aspose.Email.Foss/Aspose.Email.Foss.csproj -c Release
dotnet pack csharp/src/Aspose.Email.Foss/Aspose.Email.Foss.csproj -c Release
Examples
Examples are available under csharp/examples/:
create_msg_and_eml.csmsg_reader.csmsg_summary.cs
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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 was computed. 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 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 26.7.0 | 508 | 7/2/2026 |