> ## Documentation Index
> Fetch the complete documentation index at: https://help.xitter.space/llms.txt
> Use this file to discover all available pages before exploring further.

# Email

> Send sign-up codes, password resets and notifications.

Xitter sends mail for sign-up codes, email confirmations, password resets and notification digests. Without a mail setup, nothing is sent.

## Options

**Your own mail server**

Set `SMTP_URL`:

```sh theme={null}
SMTP_URL=smtp://user:pass@mail.example.org:587    # STARTTLS
SMTP_URL=smtps://user:pass@mail.example.org:465   # TLS
```

* Percent-encode `@` in the user name (`%40`).
* The host must be the name on the server's certificate.

**Resend**

Set `RESEND_API_KEY` to a [Resend](https://resend.com) key.

With both set, Resend sends what SMTP refused.

Set `MAIL_FROM` to the sender, for example `Xitter <noreply@xit.example.org>`. Its domain must be the mail server's, or verified in Resend.

## Test it

Admin > Email sends a test mail and shows the server's answer. It also lists every mail Xitter tried to send.

## What changes with mail set up

* Sign-up asks for a 6-digit code mailed to the address.
* Settings > Email changes the address with a confirmation link.
* Password reset by email works.
* People can turn on email digests of activity and new messages, sent while they're away.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.