From 1ab19b40fdea3d6399fcab4cd8855813e0d232cf Mon Sep 17 00:00:00 2001 From: Kaxil Naik Date: Sat, 16 Jan 2021 01:11:35 +0000 Subject: [PATCH] Add Missing Email configs in Configuration doc (#13709) closes https://github.com/apache/airflow/issues/13697 --- airflow/config_templates/config.yml | 18 ++++++++++++++++++ airflow/config_templates/default_airflow.cfg | 10 ++++++++++ 2 files changed, 28 insertions(+) diff --git a/airflow/config_templates/config.yml b/airflow/config_templates/config.yml index af437db7e6..da79a4f233 100644 --- a/airflow/config_templates/config.yml +++ b/airflow/config_templates/config.yml @@ -1262,6 +1262,24 @@ type: boolean example: ~ default: "True" + - name: subject_template + description: | + File that will be used as the template for Email subject (which will be rendered using Jinja2). + If not set, Airflow uses a base template. + version_added: ~ + type: string + example: "/path/to/my_subject_template_file" + default: ~ + see_also: ":doc:`Email Configuration `" + - name: html_content_template + description: | + File that will be used as the template for Email content (which will be rendered using Jinja2). + If not set, Airflow uses a base template. + version_added: ~ + type: string + example: "/path/to/my_html_content_template_file" + default: ~ + see_also: ":doc:`Email Configuration `" - name: smtp description: | diff --git a/airflow/config_templates/default_airflow.cfg b/airflow/config_templates/default_airflow.cfg index ccd6a95862..3c9adeba1c 100644 --- a/airflow/config_templates/default_airflow.cfg +++ b/airflow/config_templates/default_airflow.cfg @@ -626,6 +626,16 @@ default_email_on_retry = True # Whether email alerts should be sent when a task failed default_email_on_failure = True +# File that will be used as the template for Email subject (which will be rendered using Jinja2). +# If not set, Airflow uses a base template. +# Example: subject_template = /path/to/my_subject_template_file +# subject_template = + +# File that will be used as the template for Email content (which will be rendered using Jinja2). +# If not set, Airflow uses a base template. +# Example: html_content_template = /path/to/my_html_content_template_file +# html_content_template = + [smtp] # If you want airflow to send emails on retries, failure, and you want to use