'Add images to email operator on airflow
I am using airflow 1.10. I would like to add images to the email send from the email operator. I saw that I can attach files, and that I can send HTML content on an email, but when I try to add an image in the html , the resulting email shows an error box, not the image.
How can I overcome this?
image_mail= EmailOperator(
task_id="image_mail",
dag=dag,
to=['[email protected]' ],
subject='image_mail',
#html_content= EMAIL_CONTENT,
html_content="<img src=\"/scripts/img.png\"></img>",
provide_context=True
)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|