Tharga.Team.Email 4.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Tharga.Team.Email --version 4.0.0
                    
NuGet\Install-Package Tharga.Team.Email -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="Tharga.Team.Email" Version="4.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Tharga.Team.Email" Version="4.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Tharga.Team.Email" />
                    
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 Tharga.Team.Email --version 4.0.0
                    
#r "nuget: Tharga.Team.Email, 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 Tharga.Team.Email@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=Tharga.Team.Email&version=4.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Tharga.Team.Email&version=4.0.0
                    
Install as a Cake Tool

Tharga.Team.Email

E-mail for Tharga.Team: reading a mailbox over IMAP, sending over SMTP, and the MIME handling both need.

It is the mail layer shared by Tharga.Team.Support (support cases by e-mail), team mailboxes (an address per team that receives real mail) and invitation email. The package exists so that MailKit reaches only consumers who use mail.

The full guide is the Email, team mailboxes & the postmaster article.

What is in it

  • IMailClient — send a message and fetch new mail from a folder, never throwing: every outcome is a result. The mailbox is only ever read; nothing is marked, moved or deleted.
  • MailOptions / MailServerOptions — IMAP and SMTP servers, the sending address, the folder, poll interval and time-outs.
  • InboundMail, OutboundMail, MailSendResult, MailFetchPosition, MailFetchResult — the mail contracts. An inbound message carries its envelope recipients (Delivered-To, X-Original-To, Envelope-To, most trustworthy first), so a host can route it by the address it was actually delivered to.
  • RecipientFilter — accept mail only for chosen domains or addresses.

The transport knows nothing about teams, users or audit entries; a test guards that.

Team mailboxes

builder.Services.AddThargaTeamMailbox(o =>
{
    o.Domain = "example.app";
    o.Suffix = "-case";                       // {key}-case@example.app, {key}-case+{item}@example.app
    o.Mail.Imap.Host = "imap.example.app";    // the catch-all mailbox; leave empty to read nothing
});
builder.Services.AddScoped<IInboundMailContentStore, MyBlobContentStore>();
  • An opaque, rotatable key per team — a primary, and a secondary still accepted until it retires.
  • One catch-all mailbox, each mail routed by the address it was delivered to; what no team owns goes to the postmaster (IPostmasterService, system scopes), never dropped.
  • Each delivery kept once, durably, however many instances read; a mail that cannot be kept is read again rather than skipped.
  • The raw message goes to the host's IInboundMailContentStore; the toolkit keeps the envelope. Storage for keys and mail comes from Tharga.Team.MongoDB.

Invitation email

builder.Services.AddThargaEmailInvitations();   // settings from o.Email, or pass them here

The SMTP invitation sender, through the same transport and the outbound mail policy. New in 3.29 — it replaces SmtpTeamEmailSender, which lived in Tharga.Team.Service; o.Email alone no longer registers a sender.

Moving from Tharga.Team.Support

These types used to live in Tharga.Team.Support.Email. They are now in the namespace Tharga.Team.Email, and two were renamed:

Before Now
Tharga.Team.Support.Email.ISupportMailClient Tharga.Team.Email.IMailClient
Tharga.Team.Support.Email.SupportMailClient Tharga.Team.Email.MailClient (internal)
Tharga.Team.Support.Email.* Tharga.Team.Email.*

Tharga.Team.Support references this package, so support configuration (SupportCaseOptions.Email) is unchanged apart from the namespace of MailOptions.

Product Compatible and additional computed target framework versions.
.NET 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. 
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 Tharga.Team.Email:

Package Downloads
Tharga.Team.Support

Support and notifications for Tharga Team — route audited events to Slack channels, with the message shaped per event.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
4.2.0 61 10/18/2026
4.1.0 56 10/17/2026
4.0.0 52 10/17/2026
3.29.0 61 10/17/2026