Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notifier for Smtp #31359

Merged
merged 14 commits into from
Jun 7, 2023
Merged

Add notifier for Smtp #31359

merged 14 commits into from
Jun 7, 2023

Conversation

utkarsharma2
Copy link
Contributor

@utkarsharma2 utkarsharma2 commented May 17, 2023

Send email via SMTP notifier.

Example usage -

BashOperator(
            task_id="mytask",
            on_failure_callback=[
                send_smtp_notification(
                    mail_from="someone@mail.com",
                    to="someone@mail.com",
                    subject="[Error] The Task {{ ti.task_id }} failed",
                    html_content="debug logs",
                )
            ],
            bash_command="fail",
        )

@utkarsharma2 utkarsharma2 marked this pull request as draft May 17, 2023 15:11
@utkarsharma2 utkarsharma2 marked this pull request as ready for review May 18, 2023 04:56
@utkarsharma2 utkarsharma2 marked this pull request as draft May 19, 2023 06:12
@utkarsharma2 utkarsharma2 marked this pull request as ready for review May 20, 2023 02:58
@utkarsharma2
Copy link
Contributor Author

The static checks failing are unrelated to this PR, please check the slack thread - https://apache-airflow.slack.com/archives/CCPRP7943/p1685011999082929


from typing import Any, Iterable

from airflow.compat.functools import cached_property
Copy link
Contributor

Choose a reason for hiding this comment

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

We can import this from python directly now since 3.7 has been removed

@ephraimbuddy ephraimbuddy merged commit cce4ca5 into apache:main Jun 7, 2023
42 checks passed
@ephraimbuddy ephraimbuddy added this to the Airflow 2.7.0 milestone Jun 7, 2023
@ephraimbuddy ephraimbuddy removed this from the Airflow 2.7.0 milestone Jun 7, 2023
potiuk added a commit to potiuk/airflow that referenced this pull request Jun 7, 2023
The apache#31359 and apache#31742 were merged independently and the first one
did not have the fixes enabled by the second. This PR fixes it.
@eladkal eladkal mentioned this pull request Oct 30, 2023
1 task
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.

None yet

4 participants