Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions airflow-core/docs/howto/email-config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ in the ``[email]`` section.
.. code-block:: ini

[email]
email_backend = airflow.utils.email.send_email_smtp
subject_template = /path/to/my_subject_template_file
html_content_template = /path/to/my_html_content_template_file

Equivalent environment variables look like:

.. code-block:: sh

AIRFLOW__EMAIL__EMAIL_BACKEND=airflow.utils.email.send_email_smtp
AIRFLOW__EMAIL__SUBJECT_TEMPLATE=/path/to/my_subject_template_file
AIRFLOW__EMAIL__HTML_CONTENT_TEMPLATE=/path/to/my_html_content_template_file

Expand All @@ -57,14 +55,6 @@ connection called ``smtp_default`` of ``Email`` type, or choose a custom connect
the configuration & store SMTP username-password in it. Other SMTP settings like host, port etc always gets picked up
from the configuration only. The connection can be of any type (for example 'HTTP connection').

If you want to check which email backend is currently set, you can use ``airflow config get-value email email_backend`` command as in
the example below.

.. code-block:: bash

$ airflow config get-value email email_backend
airflow.utils.email.send_email_smtp

To access the task's information you use `Jinja Templating <http://jinja.pocoo.org/docs/dev/>`_ in your template files.

For example a ``html_content_template`` file could look like this:
Expand Down
6 changes: 0 additions & 6 deletions airflow-core/src/airflow/cli/commands/config_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -818,12 +818,6 @@ def message(self) -> str | None:
config=ConfigParameter("triggerer", "default_capacity"),
renamed_to=ConfigParameter("triggerer", "capacity"),
),
# email
ConfigChange(
config=ConfigParameter("email", "email_backend"),
was_removed=True,
remove_if_equals="airflow.contrib.utils.sendgrid.send_email",
),
# elasticsearch
ConfigChange(
config=ConfigParameter("elasticsearch", "log_id_template"),
Expand Down
4 changes: 4 additions & 0 deletions airflow-core/src/airflow/config_templates/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2192,6 +2192,10 @@ email:
email_backend:
description: Email backend to use
version_added: ~
version_deprecated: 3.2.0
deprecation_reason: |
Since the legacy email_on_failure and email_on_retry attributes are replaced with SmtpNotifier
from apache-airflow-providers-smtp, email_backend is no longer used.
type: string
example: ~
default: "airflow.utils.email.send_email_smtp"
Expand Down
6 changes: 0 additions & 6 deletions airflow-ctl/src/airflowctl/ctl/commands/config_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -700,12 +700,6 @@ def _get_option_value(self, config_resp: Config) -> str | None:
renamed_to=ConfigParameter("triggerer", "capacity"),
breaking=True,
),
# email
ConfigChange(
config=ConfigParameter("email", "email_backend"),
was_removed=True,
remove_if_equals="airflow.contrib.utils.sendgrid.send_email",
),
# elasticsearch
ConfigChange(
config=ConfigParameter("elasticsearch", "log_id_template"),
Expand Down
Loading