Under which category would you file this issue?
Airflow Core
Apache Airflow version
3.2.0
What happened and how to reproduce it?
Until 3.1.8, "email_on_failure" used the email_backend configured in the airflow.cfg.
Since 3.2.0, email_on_failure is deprecated and mails are send using smtpnotifier who try to send mails with default_stmp connection, bypassing the configured email_backend and email_conn_id. Since as far as I've seen, there is no way to configure an other notifier by default, it forces us to pass in all our dags to use on_error_callback before migrating.
config:
[email]
# Configuration email backend and whether to
# send email alerts on retry or failure
# Email backend to use
#
# Variable: AIRFLOW__EMAIL__EMAIL_BACKEND
#
email_backend = mymail_provider.utils.emailer.send_email
# Email connection to use
#
# Variable: AIRFLOW__EMAIL__EMAIL_CONN_ID
#
email_conn_id = exploitation_mail
[2026-04-10 16:06:19] ERROR - Failed to send notification (sync): SMTP connection is not found.
[2026-04-10 16:06:19] ERROR - Failed to send email notification
AirflowException: SMTP connection is not found.
Fichier "/home/airflow3/.local/lib/python3.11/site-packages/airflow/sdk/execution_time/task_runner.py", ligne 1618 dans _send_error_email_notification
Fichier "/home/airflow3/.local/lib/python3.11/site-packages/airflow/sdk/bases/notifier.py", ligne 138 dans __call__
Fichier "/home/airflow3/.local/lib/python3.11/site-packages/airflow/providers/smtp/notifications/smtp.py", ligne 152 dans notify
Fichier "/home/airflow3/.local/lib/python3.11/site-packages/airflow/providers/smtp/hooks/smtp.py", ligne 79 dans __enter__
Fichier "/home/airflow3/.local/lib/python3.11/site-packages/airflow/providers/smtp/hooks/smtp.py", ligne 119 dans get_conn
AirflowNotFoundException: The conn_id `smtp_default` isn't defined
Fichier "/home/airflow3/.local/lib/python3.11/site-packages/airflow/providers/smtp/hooks/smtp.py", ligne 117 dans get_conn
Fichier "/home/airflow3/.local/lib/python3.11/site-packages/airflow/sdk/bases/hook.py", ligne 61 dans get_connection
Fichier "/home/airflow3/.local/lib/python3.11/site-packages/airflow/sdk/definitions/connection.py", ligne 250 dans get
Fichier "/home/airflow3/.local/lib/python3.11/site-packages/airflow/sdk/execution_time/context.py", ligne 177 dans _get_connection
What you think should happen instead?
Since deprecation of email_on_failure comes with, it should continue to work as in 3.1.8 (or at least without the cost to fix every dags)
Operating System
No response
Deployment
None
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct
Under which category would you file this issue?
Airflow Core
Apache Airflow version
3.2.0
What happened and how to reproduce it?
Until 3.1.8, "email_on_failure" used the email_backend configured in the airflow.cfg.
Since 3.2.0, email_on_failure is deprecated and mails are send using smtpnotifier who try to send mails with default_stmp connection, bypassing the configured email_backend and email_conn_id. Since as far as I've seen, there is no way to configure an other notifier by default, it forces us to pass in all our dags to use on_error_callback before migrating.
config:
What you think should happen instead?
Since deprecation of email_on_failure comes with, it should continue to work as in 3.1.8 (or at least without the cost to fix every dags)
Operating System
No response
Deployment
None
Apache Airflow Provider(s)
No response
Versions of Apache Airflow Providers
No response
Official Helm Chart version
Not Applicable
Kubernetes Version
No response
Helm Chart configuration
No response
Docker Image customizations
No response
Anything else?
No response
Are you willing to submit PR?
Code of Conduct