You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "pankajkoti (via GitHub)" <gi...@apache.org> on 2023/05/11 15:36:04 UTC

[GitHub] [airflow] pankajkoti commented on a diff in pull request #31216: move connectionless email depreciation warning

pankajkoti commented on code in PR #31216:
URL: https://github.com/apache/airflow/pull/31216#discussion_r1191364403


##########
airflow/utils/email.py:
##########
@@ -241,27 +241,33 @@ def send_mime_email(
     smtp_user = None
     smtp_password = None
 
+    found_email_connection = False
     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
+            found_email_connection = True
         except AirflowException:
             pass
-    if smtp_user is None or smtp_password is None:

Review Comment:
   I am taking a look at the issue trail and wondering if we only need an else block here with keeping all the existing code as it is.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org