# Attachments and scheduling

> Attach files inline or from Sypnia Files, and send later.

Applies to: the Sypnia engine (open source, self-hosted) and Sypnia Cloud (paid service).  
Source: https://mail.docs.sypnia.com/sending/attachments-and-scheduling/

For agents: Mail attachments: inline content (base64 in API) or file: files://bucket/path from Sypnia Files (read with project access at send time); total ≤10 MB; executable types refused 415; inline images via inline:true + cid; scheduledAt up to 30 days ahead, mail.cancel(id) while scheduled.

## Attachments

```ts
await mail.send({
  from: 'facturas@laespiga.co', to: 'ana@example.com', template: 'receipt', data: { order: '#1042' },
  attachments: [
    { filename: 'recibo-1042.pdf', content: pdfBytes },                       // inline, base64 in the API
    { filename: 'menu.pdf', file: 'files://public/menu/menu-noviembre.pdf' },   // from Sypnia Files
  ],
});
```

The message with its attachments can be up to 10 MB. Executable types (`.exe`, `.bat`, `.js`, `.scr` and others) are refused with `415 type_not_allowed`. A file from Sypnia Files is read with the project's access when the e-mail is sent.

## Inline images

An attachment with `inline: true` and a `cid` can be shown in the HTML as `<img src="cid:logo">`. For most images a public link from Sypnia Files is lighter.

## Send later

`scheduledAt: '2026-12-24T08:00:00-05:00'` queues the e-mail for that time, up to 30 days ahead. `mail.cancel(id)` cancels it while it is still `scheduled`.
