> ## 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.

# Transactional e-mails

> The e-mails your applications send to one person.

A transactional e-mail answers something a person did: an order confirmation, an invoice, a sign-in link, an appointment reminder. Unlike a campaign, it does not go to a list, depends on no marketing consent, and is not unsubscribed from.

Lekalao sends them for your applications, and keeps them in a **log** with their opens, their clicks and any failures.

## Three ways to send them

<CardGroup cols={3}>
  <Card title="The API" icon="code" href="/developers/transactional">
    A `POST` with the template's name, the recipients and the variables.
  </Card>

  <Card title="Laravel transport" icon="laravel" href="/developers/laravel-transport">
    A Laravel application keeps `Mail::to()->send()`, Lekalao does the rest.
  </Card>

  <Card title="SMTP relay" icon="server" href="/developers/smtp-relay">
    Any application that speaks SMTP.
  </Card>
</CardGroup>

## How it works

```mermaid theme={null}
sequenceDiagram
  participant App as Your application
  participant C as Lekalao
  participant F as Sending provider
  App->>C: POST /api/v1/transactional-mails/send<br/>template, to, variables, locale
  C->>C: Renders the template (language, variables)<br/>checks the sender and the allowance
  C->>F: Sends
  C-->>App: 201 and the logged e-mail
  F-->>C: Delivered, bounced, complained (webhook)
```

1. You write a [transactional template](/transactional/templates) in the interface, with a name that does not move (`order-confirmation`).
2. Your application calls it by that name with its variables.
3. Lekalao renders it, sends it through the transactional provider, and logs it.

You may also send complete HTML without a template, through the API or the transport.

## And campaigns?

|                  | Campaign            | Transactional                         |
| ---------------- | ------------------- | ------------------------------------- |
| Recipients       | A list or a segment | The addresses of the call             |
| Started by       | The team            | An application                        |
| Unsubscribe      | Required            | No                                    |
| Suppression list | Applied             | Not applied: an invoice has to arrive |
| Provider         | The campaigns' one  | The transactional one                 |

<Tip>
  Use a separate provider (or at least a separate stream, like Postmark's
  message streams) for transactional e-mail: a reputation problem on your
  campaigns will then not stop your invoices arriving. See [A provider per
  kind of sending](/deliverability/mailers#a-provider-per-kind-of-sending).
</Tip>
