# Mailpiece with Resend

*Send your newsletter through Resend, from your own domain.*

Mailpiece sends every issue through Resend's SMTP with one API key.

## What you get

- Issues, test issues, welcome emails and confirmations
- Each newsletter's own from name, from address and reply-to
- A one-click unsubscribe in every issue, which Mailpiece honours
- The app's sign-in mail with the same key
- Prefer its API? [Send through a relay](https://mailpiece.dev/docs/relay).

## Set up Resend

Verify your domain (Resend recommends a subdomain, such as `news.example.com`), then create an API key with Sending access, limited to that domain if you like.

## Set the outgoing mail

On Settings › Outgoing mail, set up an SMTP server: the Server is `smtp.resend.com`, the Port `587`, the Username `resend` and the Password the API key. Port `587` uses STARTTLS; port `465` is TLS from the first byte. Every setting is in the [mail guide](https://mailpiece.dev/docs/mail).

```sh
# Or from the CLI
mailpiece settings sending smtp update --address smtp.resend.com --port 587 \
  --username resend --password API_KEY

# The app's sign-in mail, optional
SMTP_ADDRESS=smtp.resend.com
SMTP_USERNAME=resend
# your API key
SMTP_PASSWORD=...
# on a verified domain
MAILER_FROM_ADDRESS=...
```

## Send a test issue

Set a from address on your verified domain in Settings › Sending and send a test issue from any post. If it does not arrive, look in Resend's email log.

## Set it up this afternoon

Install Mailpiece on a server, connect Resend, and send your next issue. [Install Mailpiece](https://mailpiece.dev/docs/install)
