Apache Airflow version
main (development)
Operating System
macOsS
Versions of Apache Airflow Providers
apache-airflow-providers-amazon (main)
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
What happened
hook.send_email(
mail_from=None,
to=to,
subject=subject,
html_content=html_content,
files=files,
cc=cc,
bcc=bcc,
mime_subtype=mime_subtype,
mime_charset=mime_charset,
)
the mail_from=None will trigger an error when sending the mail, when using AWS Simple Email Service you need to provide a from address and has to be already verified in AWS SES > "Verified identities"
What you expected to happen
I expected it to send a mail but it doesn't because
How to reproduce
No response
Anything else
This is easily solved by providing a from address like in:
smtp_mail_from = conf.get('smtp', 'SMTP_MAIL_FROM')
hook.send_email(
mail_from=smtp_mail_from,
the problem is: Can we reuse the smtp.SMTP_MAIL_FROM or do we need to create a new configuration parameter like email.email_from_address ?
- smtp uses its own config smtp.smtp_mail_from
- sendgrid uses an environment variable
SENDGRID_MAIL_FROM (undocumented by the way)
So, my personal proposal is to
Are you willing to submit PR?
Code of Conduct
Apache Airflow version
main (development)
Operating System
macOsS
Versions of Apache Airflow Providers
apache-airflow-providers-amazon (main)
Deployment
Official Apache Airflow Helm Chart
Deployment details
No response
What happened
airflow/airflow/providers/amazon/aws/utils/emailer.py
Lines 40 to 41 in 098765e
the
mail_from=Nonewill trigger an error when sending the mail, when using AWS Simple Email Service you need to provide a from address and has to be already verified in AWS SES > "Verified identities"What you expected to happen
I expected it to send a mail but it doesn't because
How to reproduce
No response
Anything else
This is easily solved by providing a from address like in:
the problem is: Can we reuse the smtp.SMTP_MAIL_FROM or do we need to create a new configuration parameter like email.email_from_address ?
SENDGRID_MAIL_FROM(undocumented by the way)So, my personal proposal is to
from_email,from_name) . the sendgrid backend can already read those although seems unused at the momemt.Are you willing to submit PR?
Code of Conduct