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

# SMTP relay

> Plug in software that only knows how to send over SMTP.

WordPress, an ERP, a printer that e-mails its scans: anything that speaks SMTP can go through Lekalao. Each message received leaves again as a transactional e-mail, logged, followed and counted.

<Info>
  The relay is a process the installation's administrator has to run. When it
  runs, **Settings → Documentation** shows the host and the port. Otherwise,
  see [Processes](/self-hosting/processes).
</Info>

## Connecting

| Setting        | Value                                                                                                       |
| -------------- | ----------------------------------------------------------------------------------------------------------- |
| Host           | The one shown in **Settings → Documentation**.                                                              |
| Port           | The same; 2525 by default.                                                                                  |
| Encryption     | Depends on the installation: none on a local network, TLS when the administrator put a terminator in front. |
| Authentication | `PLAIN` or `LOGIN`.                                                                                         |
| User name      | Anything, `lekalao` for example.                                                                            |
| Password       | A **Read and write** API token.                                                                             |

The token is revoked like any other, in **Settings → API tokens**. It stops working if its owner becomes a viewer or leaves the team.

### WordPress (WP Mail SMTP)

* **Mailer**: Other SMTP
* **SMTP Host**: `smtp.lekalao.example.com`
* **Encryption**: as your installation is set up
* **SMTP Port**: `2525`
* **Authentication**: on, **Username** `lekalao`, **Password** the token

### Laravel or Symfony

```bash .env theme={null}
MAIL_MAILER=smtp
MAIL_HOST=smtp.lekalao.example.com
MAIL_PORT=2525
MAIL_USERNAME=lekalao
MAIL_PASSWORD=12|kJ3v8mQ2xP9…
```

For a Laravel application, the [dedicated transport](/developers/laravel-transport) does more.

## What goes through

| Item                        |                                                                                                          |
| --------------------------- | -------------------------------------------------------------------------------------------------------- |
| Recipients                  | Those of the envelope, 100 per message at most. Anyone in neither `To` nor `Cc` stays a blind copy.      |
| Subject, sender, `Reply-To` | Read from the headers, encodings included.                                                               |
| Body                        | The HTML part; failing that, the text part, shown as it was written.                                     |
| Size                        | 25 MB at most.                                                                                           |
| Attachments                 | **Refused**: the message is rejected with `554`. Send them through the [API](/developers/transactional). |

## What the relay answers

| Code                                | Means                                                                     |
| ----------------------------------- | ------------------------------------------------------------------------- |
| `250 Message accepted`              | Taken. It is in the transactional log.                                    |
| `535 Authentication failed`         | Unknown or revoked token, read-only token, or an owner who may not write. |
| `550 …`                             | Sender refused. The reason follows. Change the `From` address.            |
| `554 Attachments are not relayed…`  | The message carries an attachment.                                        |
| `452 Too many recipients`           | More than 100 recipients.                                                 |
| `451 Message could not be accepted` | A passing problem on Lekalao's side. The software should try again.       |
