# Mailpiece with Mailjet

*Send your newsletter through Mailjet's SMTP relay.*

Mailpiece sends every issue through Mailjet's SMTP relay with your API key pair.

## What you get

- Issues, test issues, welcome emails and confirmations
- Each newsletter's own from name, from address and reply-to
- The app's sign-in mail through the same Mailjet account
- Prefer its API? [Send through a relay](https://mailpiece.dev/docs/relay).

## Set up Mailjet

Verify your sending domain. The SMTP section of your account shows the credentials: the username is your API key, the password its secret key.

## Set the outgoing mail

On Settings › Outgoing mail, set up an SMTP server: the Server is `in-v3.mailjet.com`, the Port `587`, the Username your API key and the Password its secret key. Port `587` uses STARTTLS; port `465` is TLS from the first byte.

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

# The app's sign-in mail, optional: the same values
SMTP_ADDRESS=in-v3.mailjet.com
SMTP_USERNAME=...
SMTP_PASSWORD=...
```

## 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, check Mailjet's message statistics.

## Set it up this afternoon

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