lyle.FluentEmail.Graph 4.0.0

dotnet add package lyle.FluentEmail.Graph --version 4.0.0
                    
NuGet\Install-Package lyle.FluentEmail.Graph -Version 4.0.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="lyle.FluentEmail.Graph" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="lyle.FluentEmail.Graph" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="lyle.FluentEmail.Graph" />
                    
Project file
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 lyle.FluentEmail.Graph --version 4.0.0
                    
#r "nuget: lyle.FluentEmail.Graph, 4.0.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 lyle.FluentEmail.Graph@4.0.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=lyle.FluentEmail.Graph&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=lyle.FluentEmail.Graph&version=4.0.0
                    
Install as a Cake Tool

fluent email logo

FluentEmail - All in one email sender for .NET and .NET Core

Microsoft Graph Sender for FluentEmail

Send emails via Microsoft Graph's APIs

FluentEmail Temporary Fork

This is a temporary fork of the FluentEmail project.

Why this fork exists

I submitted an issue to the original repository (https://github.com/jcamp-code/FluentEmail/issues), but since I couldn't wait for the official update, I created this temporary library with a minor bug fix.

Usage Notice

  • I strongly recommend using the original FluentEmail library instead of this fork
  • This library is exclusively for my personal use.
  • I cannot guarantee timely updates, maintenance, bug fixes, or compatibility with future versions of the official FluentEmail library (including .NET 8.0/9.0/10.0 support).
  • Once the original maintainer of jcamp-code/FluentEmail releases an update that resolves the issue I submitted, this custom library will be deprecated immediately.

Changes Made

  • [2026-01-29] [Add Content-Id mapping for inline attachments]
// GraphSender.cs
// Add 'GraphSender' constructor
public GraphSender(GraphServiceClient graphClient, bool saveSentItems)
{
    _graphClient = graphClient;
    _saveSent = saveSentItems;
}

// Add Content-Id mapping for 'SendAsync' method
if (email.Data.Attachments != null && email.Data.Attachments.Count > 0)
{
    message.Attachments = new MessageAttachmentsCollectionPage();

    email.Data.Attachments.ForEach(a =>
    {
        var attachment = new FileAttachment
        {
            Name = a.Filename,
            ContentType = a.ContentType,
            ContentBytes = GetAttachmentBytes(a.Data),
            IsInline = a.IsInline,
            ContentId = a.ContentId
        };

        message.Attachments.Add(attachment);
    });
}

// FluentEmailGraphBuilderExtensions.cs
// Add 'AddGraphSender' extension method
public static FluentEmailServicesBuilder AddGraphSender(
            this FluentEmailServicesBuilder builder,
            TokenCredential tokenCredential,
            bool saveSentItems = false)
{
    builder.Services.TryAdd(ServiceDescriptor.Scoped<ISender>(_ => new GraphSender(new GraphServiceClient(tokenCredential), saveSentItems)));
    return builder;
}

License

Same as the original FluentEmail project.

Disclaimer

This custom build is not affiliated with, endorsed by, or associated with the official FluentEmail project, its maintainers (including jcamp-code), or the original author @lukencode. It is provided for personal use only, and any use of this library is at your own risk. The MIT License of the original FluentEmail project applies to this custom build, with all original copyright notices preserved.

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

NuGet packages (1)

Showing the top 1 NuGet packages that depend on lyle.FluentEmail.Graph:

Package Downloads
lyle.FluentEmail.Extensions

Fluent Email Extensions

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.0.0 60 1/29/2026