Repository navigation
Using settings from connection - #34556
cropland-bv wants to merge 1 commit into
Conversation
|
Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
|
Taragolis
left a comment
There was a problem hiding this comment.
I think in general it should be part of email_backend and implemented in the SMTP provider, by the same way it implemented in airflow.providers.sendgrid.utils.emailer.send_email, airflow.providers.amazon.aws.utils.emailer.send_email backends
In this case we could keep core in-depend on Provider-specific implementation.
But let's wait and see what the other says
| smtp_mail_from = conf.get("smtp", "SMTP_MAIL_FROM") | ||
| if conn_id is not None: | ||
| airflow_conn = BaseHook.get_connection(conn_id) | ||
| extra = json.loads(airflow_conn.extra) |
There was a problem hiding this comment.
| extra = json.loads(airflow_conn.extra) | |
| extra = airflow_conn.extra_dejson |
| smtp_host = airflow_conn.host | ||
| smtp_port = airflow_conn.port | ||
|
|
||
| extra = json.loads(airflow_conn.extra) |
There was a problem hiding this comment.
| extra = json.loads(airflow_conn.extra) | |
| extra = airflow_conn.extra_dejson |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions. |
When using an SMTP connection, not all fields are used when sending an e-mail with send_mime_email(). This fix addresses this by taking values from the connection, using the original values as a fallback.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named
{pr_number}.significant.rstor{issue_number}.significant.rst, in newsfragments.