# Postmark

> Page: https://docs.plotwork.dev/connectors/postmark. Index of every page: https://docs.plotwork.dev/llms.txt

Send your organisation's email through your own Postmark account, from an address on your domain. Postmark works with a server API token, which reaches one server only, and Plotwork sends on that server's outbound message stream.

## TL;DR

| Question | Answer |
|---|---|
| What do I need? | A Postmark account, a server for Plotwork's email, and your domain verified as a sender. |
| Which token? | The server API token of that server. Not the account token. |
| Which message stream? | `outbound`, the server's default transactional stream. Plotwork does not send on a broadcast stream. |
| Where does Plotwork send? | `https://api.postmarkapp.com/email`, with the token in the `X-Postmark-Server-Token` header. |

## 1. Verify the domain at Postmark

1. In Postmark, open the sender signatures and add your domain. It must be the same domain you verified in Plotwork, such as `acme.com`.
2. Publish the DNS records Postmark shows: the DKIM record, and the return path record if you want bounces to come back on your domain.
3. Wait until Postmark shows the domain as verified.

Verify the domain rather than one sender address, so any address you set on it works.

## 2. Use a server API token

A Postmark server token is not limited to sending: it can also read that server's messages and settings. Postmark has no token narrower than one server, so give Plotwork a server of its own.

1. In Postmark, create a server for Plotwork's email, such as `Plotwork`, or choose one used for nothing else.
2. Check that the server has its default transactional stream, `outbound`. Plotwork sends every email on it.
3. Open the server's API tokens and copy its server API token. Do not use the account API token, which reaches every server.

## 3. Fill in the connector

| Field in Plotwork | What to enter |
|---|---|
| Provider | Postmark |
| API token | The server API token from step 2 |
| From address | An address on the verified domain, such as `plotwork@acme.com` |

Then send a test from the Connectors tab.

## If the test fails

| Answer | Likely cause |
|---|---|
| The provider did not accept the token | It is an account token, not a server token, or the token was reset or mistyped. |
| The provider refused the email | The domain is not verified at Postmark, the server has no `outbound` stream, or the account is not yet approved to send to your address. |
| The provider could not be reached | Postmark is down or slow. Try again later. |

## See also

| Page | Why |
|---|---|
| [Email through your own domain](https://docs.plotwork.dev/connectors/email.md) | Every step, including verifying the domain in Plotwork |
| [Connectors](https://docs.plotwork.dev/connectors/overview.md) | Which email goes through the connector |
| [How your token is protected](https://docs.plotwork.dev/connectors/security.md) | How Plotwork keeps the token |
| [Postmark documentation](https://postmarkapp.com/developer) | Postmark's own guides to servers, streams and sender signatures |
