Transactional email platform

Send reliable email via API & SMTP

Self-hosted MailHub gives you domain DNS guidance, DKIM signing, delivery logs, and signed webhooks — without locking you into a black-box SaaS.

  • Self-hosted
  • DKIM
  • SPF
  • DMARC
  • Delivery webhooks
curl

Built for production senders

Everything you need to authenticate domains and observe delivery.

Domains & DNS

Guided SPF, DKIM, DMARC, and one-click DNS provider writes.

SMTP Submission

App-friendly SMTP listeners with credentials you control.

HTTP Send API

Bearer tokens and a simple JSON send endpoint for apps and services.

Mailboxes & receiving

Create persistent or expiring inboxes with IMAP, POP3, forwarding, and catch-all routing.

Delivery logs

Track queue and MTA outcomes with searchable send history.

Webhooks

Signed callbacks for sent, bounced, and failed terminal events.

Multi-user isolation

Domains, tokens, and logs stay scoped to each account.

Start in four steps

The console keeps domain, token, mailbox, and delivery configuration in one place.

2

Create a scoped token

Give each integration only the send or mailbox permissions it needs.

Review API access →
3

Provision mailboxes

Create persistent mailboxes in the console or create persistent and temporary mailboxes by API.

Review mailbox API →
4

Connect your client

Use SMTP to send and IMAP or POP3 to receive with the mailbox's full address and password.

Review protocol settings →

API authentication and sending

All public API calls use a Bearer token. The hostname below is a placeholder; replace it with your MailHub host.

Create and protect a token

Create a token in Console > API Tokens. The complete secret is shown only once, so store it outside browser code and public repositories.

  • sendsend messages with POST /api/send
  • mailboxes:readlist mailboxes with GET /api/mailboxes
  • mailboxes:writecreate mailboxes with POST /api/mailboxes

Send a message

The From domain must belong to the token account. When verified sending is enabled, complete the domain DNS checks before sending.

Authorization: Bearer <USER_API_TOKEN>

POST /api/send
Field Required Description
fromYessender address on an account-owned domain
toYesrecipient string or an address array
subjectNodefaults to (no subject)
textNoplain-text body
htmlNoHTML body; required when enabling open or click tracking
trackingNotrue/false, or { opens, clicks }; rewrites HTML only
smtpRelayIdNoan account-owned outbound SMTP relay ID
202 response

A 202 response means MailHub accepted the message for SMTP delivery. Use the console delivery log or webhooks to observe the later result.

Mailbox API and clients

Create a persistent address for ongoing work, or an expiring address for a short-lived workflow.

Mailbox API scope

POST /api/mailboxes requires mailboxes:write. The target domain must belong to the token account.

  • modepermanent or temporary
  • address / domainuse a full address, or choose domain plus localPart
  • expiresInMinutesrequired for temporary mailboxes; 5 minutes to 30 days
  • passwordoptional; a secure password is returned once when omitted

Use the returned configuration

Creation returns the address, password, expiration, and ready-to-use IMAP, POP3, and SMTP settings.

  • IMAPrecommended for synchronized folders and sent mail
  • POP3for download-oriented clients
  • SMTPuse the same full mailbox address and password to send
POST /api/mailboxes - permanent
POST /api/mailboxes - temporary
GET /api/mailboxes
201 creation response
  • The returned password is the only opportunity to read an automatically generated password.
  • A temporary mailbox expires after the requested interval and then stops receiving mail and authenticating.
  • Use mailboxes:read to list mailbox metadata; passwords are never returned by the list endpoint.

Receiving mail

Mail arrives through the domain MX record. Read it in MailHub Inbox or through standard IMAP/POP3 clients; there is no separate inbound Bearer API.

Inbound delivery

Set the domain MX record to the receiving host. External mail servers then deliver to SMTP port 25, and MailHub stores mail for an existing mailbox, alias, or catch-all target.

Mailbox, aliases, and catch-all

Create a full mailbox address first. Add aliases or forwarding on that mailbox, and configure the domain catch-all in the console to route unknown local parts to a mailbox or another address.

Protocol Recommended ports Security Use
IMAP993 / 143SSL/TLS or STARTTLSrecommended for synchronized folders
POP3995 / 110SSL/TLS or STLSdownload-oriented clients
SMTP465 / 587SMTPS or STARTTLSsend with the same mailbox address and password

IMAP exposes INBOX, Sent, Drafts, Trash, Junk, and Archive. Use IMAP when the client should synchronize these folders and save sent messages.

Domain configuration

Create the domain in MailHub first. Its DNS panel is the source of truth for your exact verification, DKIM, SPF, DMARC, and sender-host values.

Purpose Record Requirement
Domain ownershipTXT _mailhub.<domain>Publish the verification value generated in the console.
DKIMTXT <selector>._domainkey.<domain>Publish the public key generated for this domain.
SPFTXT <domain>Keep one SPF record and include the sender IP/host required by MailHub.
DMARCTXT _dmarc.<domain>Start with monitoring, then strengthen the policy after alignment is verified.
Inbound mailMX <domain>Point MX to the MailHub receiving host and ensure that host has an A/AAAA record.

For reliable delivery, also configure the sending IP's PTR to match the MailHub sending hostname and allow the documented SMTP, IMAP, and POP3 ports through your firewall.

SMTP submission

Default listener ports (override in your deployment):

25smtp
587smtp / STARTTLS
465smtps
2525smtp

Application SMTP

Create an SMTP login credential in the console for an application. Use that credential with an account-owned From domain.

Mailbox SMTP

A created mailbox can also authenticate over SMTP with its full email address and password. Use the same credentials for IMAP or POP3.

Prefer 465 or 587 for sending, 993 for IMAP, and 995 for POP3. The creation response is the source of truth when a deployment overrides default ports or TLS listeners.

Responses and common errors

The API returns JSON. Validate the HTTP status before consuming a response body.

StatusMeaningWhat to do
201Mailbox createdStore the one-time password and clientConfig.
202Message accepted for SMTP deliveryInspect delivery logs or webhooks for later delivery status.
400Invalid request or domain ownership ruleRead the JSON error and correct the request body or domain setup.
401Missing, invalid, revoked, or expired tokenCreate or rotate a valid token.
403Token does not have the required scopeGrant the minimum required scope in Console > API Tokens.
409Mailbox address already existsChoose another address or use the existing mailbox.

Delivery webhooks

Terminal events only — signed HTTPS callbacks to your systems.

Status type
sentemail.sent
bouncedemail.bounced
failedemail.failed

Signature header: X-MailHub-Signature: t=<unix>,v1=<hmac>

Ready to send?

Create an account, add a domain, and ship your first message in minutes.