Skip to content

[v3-4-test] Add emailer utilities to the SMTP provider (#74623) - #75704

Merged
vatsrahul1001 merged 1 commit into
v3-4-testfrom
backport-3199497-v3-4-test
Oct 27, 2026
Merged

vatsrahul1001 merged 1 commit into
v3-4-testfrom
backport-3199497-v3-4-test

Conversation

@github-actions

Copy link
Copy Markdown
Contributor
  • Add core email utilities to the SMTP provider

Copy airflow.utils.email into airflow.providers.smtp.utils.emailer so that
core can later deprecate its email module and delegate to the provider,
once a provider release containing it is available.

The module is a copy of the core module. The only code changes are the
imports, which go through common.compat, and the Connection lookup, which
uses BaseHook.get_connection as other providers do instead of importing
airflow.models. SMTP settings still come from the [smtp] configuration
section and only the login and password from the Connection. Routing these
calls through SmtpHook instead would change behavior for existing setups,
because the hook reads all settings from the Connection and retries
differently.

Tests are copied from core, with additional edge cases. The module is
registered as an email backend.

  • Describe the SMTP emailer without referring to core

The emailer documentation now explains what the module does and how it is
configured, without mentioning where the code came from.
(cherry picked from commit 3199497)

Co-authored-by: Shivam Rastogi 6463385+shivaam@users.noreply.github.com

* Add core email utilities to the SMTP provider

Copy airflow.utils.email into airflow.providers.smtp.utils.emailer so that
core can later deprecate its email module and delegate to the provider,
once a provider release containing it is available.

The module is a copy of the core module. The only code changes are the
imports, which go through common.compat, and the Connection lookup, which
uses BaseHook.get_connection as other providers do instead of importing
airflow.models. SMTP settings still come from the [smtp] configuration
section and only the login and password from the Connection. Routing these
calls through SmtpHook instead would change behavior for existing setups,
because the hook reads all settings from the Connection and retries
differently.

Tests are copied from core, with additional edge cases. The module is
registered as an email backend.

* Describe the SMTP emailer without referring to core

The emailer documentation now explains what the module does and how it is
configured, without mentioning where the code came from.
(cherry picked from commit 3199497)

Co-authored-by: Shivam Rastogi <6463385+shivaam@users.noreply.github.com>
@vatsrahul1001
vatsrahul1001 marked this pull request as ready for review October 27, 2026 03:41
@vatsrahul1001
vatsrahul1001 enabled auto-merge (squash) October 27, 2026 03:41
@vatsrahul1001
vatsrahul1001 merged commit 03bc831 into v3-4-test Oct 27, 2026
90 of 104 checks passed
@vatsrahul1001
vatsrahul1001 deleted the backport-3199497-v3-4-test branch October 27, 2026 04:07
@github-actions github-actions Bot added this to the Airflow 3.4.1 milestone Oct 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.4.1 based on: merged to version branch
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

vatsrahul1001 added a commit that referenced this pull request Oct 27, 2026
airflow-core now requires providers-smtp>=3.2.0 (email deprecation, #75414/#75709). The emailer source landed via #75704 but the in-repo provider version was still 3.1.1, so the CI image build failed resolving the floor. Mirrors the smtp slice of the 3.2.0 provider release (#75209): version + provider.yaml + changelog + doc refs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants