# Listmonk

Use Lettermint to send your Listmonk newsletters through SMTP and report bounces and spam complaints to Listmonk.

## Before you start

You need a running Listmonk instance, a [verified sending domain](/platform/domains/introduction), and a Lettermint project with [SMTP enabled](/guides/send-email-with-smtp#enable-smtp).

Use a [broadcast route](/platform/projects-and-routes/routes) for newsletters. Set it as the project's default outbound route before you send a campaign.

## Connect SMTP

In Listmonk, open Settings, then SMTP. Enable SMTP and select the Lettermint preset.

Set the username to `lettermint` and the password to your Lettermint Project API token. Save the settings and use Test connection to check them. If your Listmonk version has no preset, use the [SMTP connection settings](/guides/send-email-with-smtp#smtp-configuration).

Set your Listmonk sender address to an address on your verified domain.

## Connect bounce webhooks

Create a [webhook](/platform/webhooks/introduction) on the Lettermint broadcast route. Use your Listmonk address with this path:

```text
https://listmonk.example.com/webhooks/service/lettermint
```

Select these events:

- `message.hard_bounced`
- `message.soft_bounced`
- `message.spam_complaint`

In Listmonk, open Settings, then Bounces. Enable bounce processing, bounce webhooks, and Lettermint. Copy the Lettermint webhook's signing secret into the Lettermint Webhook Secret field and save the settings. Include the `whsec_` prefix.

See [Listmonk bounce processing](https://listmonk.app/docs/bounces/) for subscriber actions after a bounce or complaint.

## Include the campaign ID

If Listmonk records bounces without a campaign ID, add this custom header to your Listmonk campaign:

```json
[
  {"X-LM-Metadata-X-Listmonk-Campaign": "{{ .Campaign.UUID }}"}
]
```

Listmonk replaces the template with the campaign UUID. Lettermint adds it to `data.metadata["X-Listmonk-Campaign"]` in the webhook. This works with Listmonk versions that read the campaign ID only from metadata.

Listmonk versions that read [webhook headers](/platform/webhooks/events#common-envelope) can use the standard `X-Listmonk-Campaign` header instead. Adding the metadata header applies to new messages only.
