This is an automated email from the ASF dual-hosted git repository.

amoghdesai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new e603cd80f8c Swap `send_mime_email` in core to use Connection instead 
of BaseHook (#54084)
e603cd80f8c is described below

commit e603cd80f8c2cfb054e619b02c8544ebc0439c05
Author: Amogh Desai <[email protected]>
AuthorDate: Mon Aug 4 16:41:56 2025 +0530

    Swap `send_mime_email` in core to use Connection instead of BaseHook 
(#54084)
---
 airflow-core/src/airflow/utils/email.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/airflow-core/src/airflow/utils/email.py 
b/airflow-core/src/airflow/utils/email.py
index e47ea49dce8..e269b483386 100644
--- a/airflow-core/src/airflow/utils/email.py
+++ b/airflow-core/src/airflow/utils/email.py
@@ -246,9 +246,9 @@ def send_mime_email(
 
     if conn_id is not None:
         try:
-            from airflow.sdk import BaseHook
+            from airflow.models import Connection
 
-            airflow_conn = BaseHook.get_connection(conn_id)
+            airflow_conn = Connection.get_connection_from_secrets(conn_id)
             smtp_user = airflow_conn.login
             smtp_password = airflow_conn.password
         except AirflowException:

Reply via email to