Table of Contents

Tag 'email'

The email tag allows you to customize headers of your outgoing messages.
There are several convenience subtags such as cc or subject (see the table below)
that simplify the job but you can also use a header subtag to set an arbitrary
SMTP header for the message.

Subtag Description Example
subject dynamic subject {% subject = 'Greetings from Example company!' %}
cc carbon copy {% cc = 'boss@example.com' %}
bcc blind carbon copy {% bcc = 'all@example.com' %}
from the actual sender {% from = 'system@example.com' %}
reply-to {% reply-to = 'support@example.com' %}
header custom SMTP header {% header 'X-SMTP-Group' = 'Important' %}
{% email %}
  {% subject = 'Greetings from Example company!' %}
  {% reply-to = 'support@example.com' %}
{% endemail %}

Example: Complex example

{% email %}
  {% if plan.system_name == 'enterprise' %}
     {% bcc 'marketing@world-domination.org' %}
  {% endif%}
{% endemail %}