Skip to content

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

@jedcunningham jedcunningham requested a review from dstandish May 30, 2023 23:31

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

4 participants