Preview — the control plane that answers “which of my applications stopped sending?”
The dashboard is in progress; the library below ships today.
Transactional email that actually arrives — over any provider, without running a mail server.
Sending mail from an application is two problems wearing one hat.
The first — handing a message to a provider — is a single HTTP call. The second — getting receivers to believe the message is yours — is SPF, DKIM and DMARC, and it is where almost everyone's mail quietly ends up in spam. Quietly is the operative word: mail fails silently. Nothing throws, nobody is told, and the password reset simply never arrives.
flui-mail does the first over whatever provider you like, and takes the second
seriously.
Because the reputation problem has no local solution. Most cloud hosts block outbound SMTP ports on new instances by default, and a fresh address range has no sending history for receivers to trust. Running your own MTA means earning that trust from zero and being able to lose it to a single misconfiguration.
So this project never installs one. It authenticates your domain and relays through a provider whose reputation already exists — and then watches whether the mail is actually landing.
Everything speaks one small interface, so a provider that isn't in the box is a file in yours:
interface MailDriver {
readonly id: MailProviderId;
send(req: SendRequest): Promise<SendResult>;
ensureDomain(domain: string): Promise<DomainStatus>;
}MailProviderId is an open union, so a driver written outside this package names
itself — nothing here decides which providers are allowed to exist.
And if your provider speaks SMTP, which all of them do, there is nothing to write at all: the generic driver already covers it. The protocol sits behind a seam, so you hand it the client you have already configured rather than adopting ours.
Three API drivers ship in the box alongside that generic relay. None is privileged: they are defaults, not the architecture.
📖 Choosing a provider — what ships in the box, and what to look for in anything else. 📖 Adding a provider — an SMTP relay in about twenty lines, an HTTP API in thirty.
- The deliverability records, correctly. It knows a domain may publish only
one SPF record, that a new sender is merged into that record rather than added
beside it, and that a term written after
allauthorises nothing while looking exactly as though it did. - Verification reads DNS, not the zone API. What your zone file says and what the world resolves are different things while a change propagates, and only the second one decides whether mail authenticates.
- DMARC is amber, never red. It does not block a send — SPF and DKIM authenticate, DMARC only asks receivers to report. Painting it as an error teaches people to ignore errors.
- It stops writing to dead addresses. A permanent bounce or a spam complaint suppresses an address; a temporary refusal never does. Greylisting is designed to look like a failure the first time, and treating it as one would silently cut off someone whose mail was fine.
- Metadata only. Recipient, timing, verdict, and the subject line — because a log that cannot tell an invitation from a password reset is not worth consulting. Message bodies are never stored. This is a control plane for sending, not a mailbox, and it stays on the right side of that line deliberately.
The core assumes no filesystem, no database and no public URL, because its two consumers disagree about all three: one runs on a laptop with no inbound address, the other is a hosted multi-tenant platform. Anything host-specific enters through a seam:
| seam | what it decides |
|---|---|
CredentialResolver |
where the provider token comes from |
DnsWriter |
whether records can be published for you, or only shown |
DnsLookup |
what the public internet actually resolves |
DeliveryEventSink / Source |
whether outcomes are polled or pushed |
SmtpTransport |
which SMTP client speaks the protocol |
SuppressionStore |
where the do-not-send list lives |
That fourth one is not a detail. A client on someone's machine has no address a provider can call back on, so it polls; a hosted platform has one, so it receives webhooks. Same seam, opposite direction — and polling is what lets a local client promise that nothing about your mail ever reaches anyone else's server.
packages/core @flui-cloud/mail — drivers, deliverability, suppressions, seams
Anything that needs a Node runtime lives behind the @flui-cloud/mail/node entry
point, so the package index stays importable from a browser bundle.
pnpm install
pnpm -r test
pnpm -r buildApache-2.0.

