The GitHub Actions job "Check newsfragment PR number" on 
airflow.git/fix/34554-email-conn-extras has failed.
Run started by GitHub user 1fanwang (triggered by 1fanwang).

Head commit for run:
d21b16d8adcb70af0db7047b39c5a9367b7b5672 / 1fanwang <[email protected]>
Honor SMTP connection host/port and extra in send_mime_email

The Connection passed to ``airflow.utils.email.send_mime_email`` was only
read for ``login`` and ``password``. ``host``, ``port``, ``starttls``,
``ssl``, ``timeout`` and ``retry_limit`` were always taken from the
``[smtp]`` config, so a Connection configured in the UI or via secrets
had no effect on those fields. This is surprising in a deployment that
pins the SMTP connection through Airflow's connection store (and is what
the SMTP provider's hook does for its own ``send_email`` path).

The Connection now overrides the corresponding config values when set:

* ``host`` / ``port`` from the Connection take precedence over
  ``smtp_host`` / ``smtp_port``.
* The Connection ``extra`` JSON may include ``disable_tls``,
  ``disable_ssl``, ``timeout`` and ``retry_limit`` keys — matching the
  schema the SMTP provider already declares for its connection — and
  these override the config when present.

When the Connection does not set a field (or the connection lookup
raises ``AirflowException``), the existing ``[smtp]`` config values are
still used, so deployments that configure SMTP entirely through
``airflow.cfg`` keep working unchanged.

Closes: #34554

Report URL: https://github.com/apache/airflow/actions/runs/25729800683

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to