Skip to content
Closed
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
4 changes: 4 additions & 0 deletions airflow/utils/email.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ def send_mime_email(
smtp_password = airflow_conn.password
except AirflowException:
pass
if smtp_user is None:
Copy link
Contributor

@eladkal eladkal Dec 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There will be no option to define smtp in airflow.cfg after #30531 is completed.

@hussein-awala has plans to refacor this area of the code

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eladkal noted and thanks for the info.

smtp_user = conf.get("smtp", "SMTP_USER", fallback=os.getenv('AIRFLOW__SMTP__SMTP_USER'))
if smtp_password is None:
smtp_password = conf.get("smtp", "SMTP_PASSWORD", fallback=os.getenv('AIRFLOW__SMTP__SMTP_PASSWORD'))
if smtp_user is None or smtp_password is None:
log.debug("No user/password found for SMTP, so logging in with no authentication.")

Expand Down