> ## Site index
> Every page on this site is listed at https://mailkube.com/llms.txt.

> ## Agent instructions
> This site presents mailkube, a service that sends transactional email over a REST API or SMTP.
> Customer data is stored in the European Union.
> Read the developer documentation at https://docs.mailkube.com, which publishes its own llms.txt.
> Take prices and plan volumes from https://mailkube.com/pricing.md, never from a comparison page or a blog post.
> Read the legal documents at their HTML address.
> Every published version of the terms, privacy policy and data processing addendum is kept byte for byte under /legal/<document>/<sha256>/.
> Quote the checked-on date that a comparison page prints with its competitor figures.
> When this site does not state a price, limit or capability, say so instead of guessing.

# SMTP Relay

> Point an existing SMTP client at mailkube and keep your code as it is. Same delivery, same logs, same webhooks as the REST API.

Source: https://mailkube.com/features/smtp/


## Submission over SMTP

Change the host, the port and the credentials in your mailer configuration. The messages your application was already sending are relayed from then on. Framework mailers, no-code tools and long-lived internal services all reach the same submission server.

## Connection settings

| Setting | Value |
|---|---|
| Host | `smtp.mailkube.com` |
| Port | `587` (STARTTLS) |
| Encryption | Required, negotiated with `STARTTLS` |
| Username | Your SMTP credential's username, followed by `@` and its domain |
| Password | The credential's secret |

Port 587 connects in the clear and upgrades with `STARTTLS` before authenticating. Disable any unencrypted fallback your client offers.

## Credentials and the From address

Create an SMTP credential in the dashboard, bound to one verified domain. Its password is shown once, at creation.

Your username has to carry the domain, `myapp01@example.com` rather than `myapp01`. The part after the `@` selects the verified domain the session sends for. A bare username is rejected with `5.7.8`.

Your `From` address has to use that same domain. A mismatch is refused with a `550` naming the domain it expected.

An SMTP credential is not an API key. API keys authenticate the REST API, and SMTP sessions authenticate with their own credential.

## The same features, in headers

Everything the REST API takes as a JSON field, SMTP takes as a header. Those headers are stripped before the message reaches the recipient.

| Header | Effect |
|---|---|
| `X-Mailkube-Tags` | A JSON array of `{ name, value }` pairs, the same shape and limits as the REST `tags` field |
| `X-Mailkube-Topic` | Attributes the send to a topic, so recipients who opted out of it are filtered |
| `X-Mailkube-Template-Id` | Renders a saved template server-side instead of the body you composed |
| `X-Mailkube-Template-Version` | A version number or `latest` |

A malformed header fails the send with a reply whose text names the problem.

## Delivery visibility

An SMTP send is the same message as an API send. It lands in the same delivery logs, counts against the same quota, carries the same tags, and produces the same webhook events. Transient failures at the receiving end are retried, and the message surfaces as `email.delivery_delayed` until it delivers or runs out of attempts.

## SMTP reference and error codes

- [SMTP reference](https://docs.mailkube.com/smtp-reference/overview) covers connection, authentication, headers and rate limits
- [Error codes](https://docs.mailkube.com/smtp-reference/error-codes) lists every enhanced status code the server can reply with, and what to do about each
- Tagging works the same over both transports, see [message tags](/features/tagging/)

