Email Configuration

You can configure the email that is being sent in your airflow.cfg by setting a subject_template and/or a html_content_template in the email section.


email_backend =

subject_template = /path/to/my_subject_template_file
html_content_template = /path/to/my_html_content_template_file

To access the task’s information you use Jinja Templating in your template files.

For example a html_content_template file could look like this:

Try {{try_number}} out of {{max_tries + 1}}<br>
Log: <a href="{{ti.log_url}}">Link</a><br>
Host: {{ti.hostname}}<br>
Log file: {{ti.log_filepath}}<br>
Mark success: <a href="{{ti.mark_success_url}}">Link</a><br>


For more information on setting the configuration, see Setting Configuration Options

Was this entry helpful?