kaxil commented on a change in pull request #18200:
URL: https://github.com/apache/airflow/pull/18200#discussion_r707294631
##########
File path: airflow/providers/amazon/aws/utils/emailer.py
##########
@@ -32,12 +35,23 @@ def send_email(
mime_subtype: str = 'mixed',
mime_charset: str = 'utf-8',
conn_id: str = 'aws_default',
+ from_address: str = None,
+ from_name: str = None,
**kwargs,
) -> None:
"""Email backend for SES."""
hook = SESHook(aws_conn_id=conn_id)
+ if from_name and from_address:
+ mail_from=f'{from_name} <{from_address}>'
+ elif from_address:
+ mail_from = from_address
+ else:
+ raise AirflowConfigException("mail_from must be provided")
+
Review comment:
Should we do same as
https://github.com/apache/airflow/blob/8ae2bb9bfa8cfd62a8ae5f6edabce47800ccb140/airflow/providers/sendgrid/utils/emailer.py#L70-L74
instead of `from_address` and `from_name`?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]