email

{% email %} sends an email notification.

{% email to:"[email protected]", subject:"Hello", cc:"[email protected]", bcc:"[email protected]", replyTo:"[email protected]" %}
Hello World!
{% endemail %}

Accepts:

  • to - email address of the recipient

  • subject - subject of the email

  • cc - cc of the email

  • bcc - bcc of the email

  • replyTo - replyTo of the email

  • attachments - an array of attachments

The content of the email is defined between {% email %} {% endemail %} tags

{% capture csv_file_content %}
order_number,date
#1000,2025-10-01
{% endcapture %}

{% json attachments %}
[
  {
    "filename": "report.csv",
    "content": {{ csv_file_content | strip | json }}
  }
]
{% endjson %}

{% comment %}Send email with CSV attachment{% endcomment %}
{% email to: "[email protected]", subject: "CSV Report", attachments:attachments %}
Csv report attached.
{% endemail %}

Your email body can contain html.

Last updated