FluentEmail.Graph
2.0.0
See the version list below for details.
dotnet add package FluentEmail.Graph --version 2.0.0
NuGet\Install-Package FluentEmail.Graph -Version 2.0.0
<PackageReference Include="FluentEmail.Graph" Version="2.0.0" />
<PackageVersion Include="FluentEmail.Graph" Version="2.0.0" />
<PackageReference Include="FluentEmail.Graph" />
paket add FluentEmail.Graph --version 2.0.0
#r "nuget: FluentEmail.Graph, 2.0.0"
#addin nuget:?package=FluentEmail.Graph&version=2.0.0
#tool nuget:?package=FluentEmail.Graph&version=2.0.0
FluentEmail.Graph
Sender for FluentEmail that uses Microsoft Graph API.
Usage
Call one of the AddGraphSender
extension methods.
var graphSenderOptions = this.Configuration
.GetSection("GraphSenderOptions")
.Get<GraphSenderOptions>();
services.AddFluentEmail("alias@test.com")
.AddRazorRenderer()
.AddGraphSender(graphSenderOptions);
Example config in appsettings.json
{
"GraphSenderOptions": {
"TenantId": "your tenant id",
"ClientId": "your app id",
"Secret": "your secret here"
}
}
v2
The original version only used the user: sendMail Graph API endpoint. This could not handle attachments over 3MB.
Starting with v2, if you have included any attachments, the implementation will switch to the following:
- A draft message is created
- Attachments are added using attachment: createUploadSession
- The mail is sent using message: send.
⚠️BREAKING: The Mail.ReadWrite
permission is required when adding attachments.
Microsoft Docs on using the Graph API to send large attachments
⚠️REMOVED: Unfortunately, the Microsoft Graph API Send
method does not have a SaveSentItems
argument like
the SendMail
method
that was previously used. The SaveSentItems
option has been removed and there is no way to disable this anymore. (
See Link 1
, Link 2,
and Link 3).
Uploading attachments to a draft message was contributed by @huntmj01.
Graph API Permissions
The Mail.Send
permission must be granted.
Adding attachments? Then the Mail.ReadWrite
permissions is also required.
Release
Create new release with creation of new tag on main branch.
Start publish manually, for the new tag. This will push the package to github and nuget.org
Origin
Code originally written by Matt Goldman and merged into FluentEmail repo. But it was not published to NuGet until January 2021. Because we needed this implementation we created a separate repo, modified the code a bit and published it to NuGet.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | 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. |
-
.NETStandard 2.0
- Azure.Identity (>= 1.6.1)
- FluentEmail.Core (>= 3.0.2)
- Microsoft.Graph (>= 4.39.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.