stark256-spec commented on issue #34554:
URL: https://github.com/apache/airflow/issues/34554#issuecomment-5187414157

   I'd like to take this one. Confirmed it still reproduces on current main.
   
   In send_mime_email (airflow-core/src/airflow/utils/email.py), the SMTP 
settings are read from config — smtp_host, smtp_port, smtp_starttls, smtp_ssl, 
smtp_retry_limit, smtp_timeout all come from conf.get*("smtp", …). When a 
conn_id is resolved, only login and password are taken from the connection; 
host, port, and the TLS/timeout settings in the connection's extra are ignored. 
So configuring an SMTP connection still silently pulls host/port/TLS from the 
global config.
   
   Plan:
   
   When conn_id resolves a connection, prefer its host / port, and read 
disable_tls / disable_ssl / timeout / retry_limit / from_email from 
extra_dejson, each falling back to the existing config value when not set on 
the connection — so current behavior is unchanged for anyone not populating 
those fields.
   Keep this consistent with how the smtp provider hook reads the same extra 
keys, to avoid divergence between the two paths.
   Add unit tests in airflow-core/tests/unit/utils/test_email.py covering both 
the connection-provided and config-fallback cases.
   Will open a PR shortly following the PR template.


-- 
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