Taragolis commented on code in PR #34556:
URL: https://github.com/apache/airflow/pull/34556#discussion_r1334541819


##########
airflow/utils/email.py:
##########
@@ -128,6 +130,10 @@ def send_email_smtp(
     >>> send_email('[email protected]', 'foo', '<b>Foo</b> bar', ['/dev/null'], 
dryrun=True)
     """
     smtp_mail_from = conf.get("smtp", "SMTP_MAIL_FROM")
+    if conn_id is not None:
+        airflow_conn = BaseHook.get_connection(conn_id)
+        extra = json.loads(airflow_conn.extra)

Review Comment:
   ```suggestion
           extra = airflow_conn.extra_dejson
   ```



##########
airflow/utils/email.py:
##########
@@ -245,11 +251,18 @@ def send_mime_email(
 
     if conn_id is not None:
         try:
-            from airflow.hooks.base import BaseHook
-
             airflow_conn = BaseHook.get_connection(conn_id)
             smtp_user = airflow_conn.login
             smtp_password = airflow_conn.password
+            smtp_host = airflow_conn.host
+            smtp_port = airflow_conn.port
+
+            extra = json.loads(airflow_conn.extra)

Review Comment:
   ```suggestion
               extra = airflow_conn.extra_dejson
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to