Skip to content

Migrate FluentEmail.Graph to Microsoft.Graph 5.x (fixes #380) - #393

Closed
SENESO wants to merge 2 commits into
lukencode:masterfrom
SENESO:upstream-pr-380
Closed

SENESO wants to merge 2 commits into
lukencode:masterfrom
SENESO:upstream-pr-380

Conversation

@SENESO

@SENESO SENESO commented Oct 8, 2026

Copy link
Copy Markdown

Fixes #380.

Microsoft.Graph 3.22.0 pins System.Text.Json to [6.0, 8.0), so FluentEmail.Graph cannot be installed on .NET 8. This migrates the Graph sender to Microsoft.Graph 5.105.0, which removes that constraint.

Changes:

  • Microsoft.Graph 3.22.0 → 5.105.0
  • Microsoft.Graph.Auth (preview-only, never went stable) and direct MSAL usage replaced by Azure.Identity's ClientSecretCredential
  • Send call rewritten for the v5 request-builder API (Users[userId].SendMail.PostAsync)
  • Public API is unchanged — same constructor, Send/SendAsync signatures, and AddGraphSender DI extension, so this is a drop-in upgrade
  • Bonus: the CancellationToken passed to SendAsync is now actually honored (it was silently ignored before)

Verified: the Graph project builds clean (Release, 0 warnings, 0 errors).

SENESO and others added 2 commits October 8, 2026 19:39
…ncode#388)

Allows subclassing MailKitSender to preprocess the MimeMessage before
sending (e.g. DKIM-signing), as requested in
lukencode#388.

Adds CanPreprocessMessageByOverridingCreateMailMessage test proving a
subclass can modify the outgoing message.
Microsoft.Graph 3.22.0 pins System.Text.Json to [6.0, 8.0), so the package
cannot be installed on .NET 8. Upgrading to 5.105.0 removes that constraint.

- Microsoft.Graph.Auth (preview-only, never stable) replaced by Azure.Identity
- ClientSecretCredential passed directly to GraphServiceClient
- Send call rewritten for the v5 request-builder API
- Public API unchanged: same constructor, Send/SendAsync signatures, DI extension
- CancellationToken is now actually honored (was silently ignored before)
@SENESO

SENESO commented Oct 8, 2026

Copy link
Copy Markdown
Author

Superseded by #394 — this PR got into a broken state. The new PR contains only the Graph files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support .NET 8

1 participant