> For the complete documentation index, see [llms.txt](https://docs.fylr.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fylr.io/for-developers/api/endpoints/system/sendmail.md).

# /sendmail

Sends an email through the fylr server's mail infrastructure, composed as a multipart message with separate HTML and text bodies and optional attachments. Each send writes an `EMAIL_SENT` or `EMAIL_SENT_FAILED` event. Requires `system.sendmail` (or `system.root`).

### `POST /system/sendmail` — This endpoint sends an mail using the fylr server infrastructure. The mail is composed as multipart mail with separate HTML and text bodies. The user needs the `system.sendmail` or `system.root` system right. After sending an email `EMAIL_SENT` or `EMAIL_SENT_FAILED` event is written.

{% openapi src="/files/kfiDjhyZfEICNBmt5f49" path="/system/sendmail" method="post" %}
[fylr-openapi.yml](https://4100607288-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FAdRFzQASDY2Elfdm3wXW%2Fuploads%2Fgit-blob-ca0ed768cf0f36ca55fc3ee2ac61892ce5444d46%2Ffylr-openapi.yml?alt=media)
{% endopenapi %}
