# Email

Rezin Core sends email for your project: the messages around sign-in, in your project's own name and colours.

## Fixed templates

Every message is built from a fixed template with a few short named fields (a name, a link, a code) and nothing else. There is no free-text email. That is deliberate: private information cannot be mailed by mistake.

> **Not built yet.** The wording of the templates cannot be edited, and your application cannot send its own messages through the API.

## The templates and when they are sent

| Template | Sent when |
|---|---|
| Confirm sign-up | A person signs up in a project that confirms addresses |
| Welcome | An account is created, when the project has a Site URL |
| Sign-in link or code | `POST /v1/auth/magiclink` |
| Confirm new email address | `POST /v1/auth/email`, to the new address |
| Email address changed | After a change of email, to the old address |
| Confirmation code | `POST /v1/auth/reauthenticate` |
| Password changed | A user's password changes |
| Authenticator turned on, turned off | A user's second step changes |
| Invitation, Reset password | Templates exist; not sent through the API today |

See [Email flows](https://rezincore.com/docs/auth/email-flows.md) for the flows behind them.

Notices are sent in the background after the change has happened. If one cannot be sent, the change still stands.

## How they look

One layout: your logo and name, a heading, a few short lines, one button with its link written out beneath, and a small footer saying why the person was sent it. It reads at phone width, has a dark version and always has a plain-text part.

Set your branding on the project's **Emails** page:

- **Name shown** as the sender and in the heading.
- **Logo address**: must be `https` on the project's own sending domain, so nothing loads from an outside host.
- **Button colour**.
- **Support address** (optional), shown in the footer.

The same page lists every template with a live preview in light and dark, and a button that sends a test, with made-up values, only to the address of whoever is signed in.

## Is email set up for my project?

The **Emails** page says so. Sending from your own domain is arranged with Rezin Core today; there is no self-service form for it yet. Until email is set up for a project, the flows that need it answer `503 email_not_ready`.

## Limits

A project may send 200 emails an hour.

## What is recorded

Each message is noted in an outbox: the template, the recipient, the sender, the subject and whether it was delivered. **The body is not kept.** Rezin Core uses one outside provider to deliver mail; it is named on the [privacy page](https://rezincore.com/privacy.html).
