airflow icon indicating copy to clipboard operation
airflow copied to clipboard

Add from_email parameter to EmailOperator

Open shakeelansari63 opened this issue 1 year ago • 7 comments

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

shakeelansari63 avatar Aug 10 '23 13:08 shakeelansari63

Sure - go for it

potiuk avatar Aug 10 '23 14:08 potiuk

Such a nice feature request!

d2015196 avatar Aug 10 '23 19:08 d2015196

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.

Limess avatar Apr 16 '24 13:04 Limess

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.

potiuk avatar Apr 16 '24 13:04 potiuk

I am traveling this week. Will work on this soon as I get access to my pc.

shakeelansari63 avatar Apr 16 '24 18:04 shakeelansari63

I will add it to my to-do list for this week 🤦‍♂️

hussein-awala avatar Apr 16 '24 18:04 hussein-awala

Rebased and resolved conflicts in PR #33288

shakeelansari63 avatar May 01 '24 08:05 shakeelansari63

Closed the PR. Cleaning up the issue as well.

shakeelansari63 avatar Jun 16 '24 15:06 shakeelansari63