airflow
airflow copied to clipboard
Add from_email parameter to EmailOperator
Description
I am looking for adding from_email parameter to EmailOperator. Currently, the EmailOperator takes the sender email from Airflow Config. Which means the emails going from Airflow will always go from same email.
But we need a way where The EmailOperator user can define the from_email so that sender email can be changed per DAGs.
And lets make this parameter optional, meaning if user does not provide any email, it will still use the one defined in config.
Use case/motivation
When developing different DAGs for different Business units which deliver reports to Business users, we need a way to define sender email. So that when business users respond to the email, it goes to right team.
Related issues
No response
Are you willing to submit a PR?
- [X] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Sure - go for it
Such a nice feature request!
It looks like the PR for this got closed as stale without a review? (https://github.com/apache/airflow/pull/33288)
Could that get re-opened and reviewed, this would be a nice feature.
I reopened it, but it needs to be rebased by the author and I think it has been waiting for @hussein-awala review technically - and @Limess - the easiest way to continue is if you ask there if the author wants to continue and rebase / fix conflicts and if they are ok with it - even taking over the PR and leading it to completion.
I am traveling this week. Will work on this soon as I get access to my pc.
I will add it to my to-do list for this week 🤦♂️
Rebased and resolved conflicts in PR #33288
Closed the PR. Cleaning up the issue as well.