turbaszek edited a comment on issue #12190:
URL: https://github.com/apache/airflow/issues/12190#issuecomment-723897026
Users can use custom `on_success_callback` to achieve this behaviour:
```py
from airflow.utils.email import send_email
def on_success_callback(context):
ti: TaskInstance = context["ti"]
dag_id = ti.dag_id
task_id = ti.task_id
msg = "DAG succeeded"
subject = f"Success {dag_id}.{task_id}"
send_email(to=EMAIL_LIST, subject=subject, html_content=msg)
```
Personally I prefer this generic approach - users can customise the subject,
title and what ever they want to fit their needs.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]