Interface ITeamEmailSender
- Namespace
- Tharga.Team
- Assembly
- Tharga.Team.dll
Sends the invitation email. Implement it to use your own mail infrastructure (SendGrid, Azure, an existing pipeline) instead of the built-in SMTP sender.
public interface ITeamEmailSender
Remarks
Invitations are the only mail the core sends, and this interface is the whole surface for them.
Support cases are the exception, and a deliberate one: Tharga.Team.Support reads and sends mail
through its own transport, its own options and its own SMTP stack.
With mail to users registered (AddThargaUserMail in Tharga.Team.Email), invitations are
sent through its outbox instead, in the required account category and from its address, so each is recorded,
shows in the invited person's mail history and is marked bounced when it comes back. A sender the host
registered itself is left in place.
Not given a fallback to support's settings. Each sends from the address it is configured with, and every one of them should be an address a reply reaches: a no-reply address loses every reply. A host wanting one mailbox for both binds them from the same configuration section, explicitly.
When nothing is registered, the invite dialogs fall back to manual link copying rather than failing. That is a supported configuration, not a degraded one — but it looks identical to having forgotten to configure email, so a host seeing invitations go unsent should check whether a sender is registered at all.
Methods
SendInviteAsync(TeamInviteMail)
Sends one invitation. TeamKey identifies the team, so mail that depends on it — its language, branding or sender — looks the team up by key rather than by display name or ambient state.
Task SendInviteAsync(TeamInviteMail mail)
Parameters
mailTeamInviteMail
Returns
Remarks
The only member since 4.0. The four-string overload it replaced (recipient email, recipient name, link and
team name) was removed; a sender that implemented it moves the same four values off mail.