---
question: Is the email service on by default?
kind: overview
---

# Email

The email service sends one message at a time through the adapter set in `services.email`. Modules use it for notifications and reports. Nexus sends its invitations and sign-in links through it too.

Super admins can send a message and read the mail the adapter keeps in Nexus, under System › Data › Email.

<!-- matrix -->

## Backends

`services.email.email_adapter` picks one adapter:

| Adapter | Sends through | Keeps a copy |
|---|---|---|
| `smtp` | An SMTP server | No |
| `filesystem` | Nothing: writes each message as an `.eml` file under `directory` | Yes |
| `ses` | Amazon SES | No |
| `sendgrid` | The SendGrid API | No |
| `microsoft_outlook` | Microsoft Graph, as one mailbox (`user`) | No |
| `nats_rpc` | Another engine's email service, over NATS | That engine's adapter decides |

When `config.yaml` has no `email:` block, as in a new project, the engine uses `smtp` on `localhost`, port `1025`. Nothing listens there unless you run a mail server, so a send fails. `config.local.yaml` (the Docker stack) uses `filesystem` in `storage/email`. The keys of each adapter are on [Choose a provider](/user-guide/build/platform/choose-an-email-provider).

## Key concepts

- **One call, one message.** `send` takes the recipients, a subject, a text body and an optional HTML body and attachments, and hands the message to the adapter.
- **Recipients.** `to_email` and `to_emails` both accept one address, a comma-separated string or a list. They are merged, trimmed and de-duplicated. No address at all raises `ValueError`.
- **Kept copies.** Only the `filesystem` adapter keeps what it sent. `list_sent`, `get_sent` and `delete_sent` work on those copies; on any other adapter they raise `SentEmailsNotKept`. Deleting a copy never recalls a message.
- **Events.** A send publishes `EmailSent`. A failure publishes `EmailError`, then raises.
- **Sender.** `from_email` is required in Python. Mail sent from System › Data › Email comes from the `naas_abi` module's `nexus_config.email_from_address` (default `no-reply@nexus.example.com`).
- **Dependency.** A module lists `EmailService` in `ModuleDependencies.services`. The attribute is `self.engine.services.email`.
