Repository: incubator-airflow
Updated Branches:
refs/heads/master d02e8eb9d -> a5e57dc4a
[AIRFLOW-1367] Pass Content-ID
To reference inline images in an email, we need to be able to add
<img src="cid:{}"/> to the HTML. However currently the Content-ID (cid)
is not passed, so we need to add it
Closes #2410 from aliceabe/master
Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/a5e57dc4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/a5e57dc4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/a5e57dc4
Branch: refs/heads/master
Commit: a5e57dc4a691d2698ef15109e8e81252c224d2ab
Parents: d02e8eb
Author: Alice Berard <[email protected]>
Authored: Fri Jun 30 16:00:49 2017 -0700
Committer: Dan Davydov <[email protected]>
Committed: Fri Jun 30 16:00:53 2017 -0700
----------------------------------------------------------------------
airflow/utils/email.py | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/a5e57dc4/airflow/utils/email.py
----------------------------------------------------------------------
diff --git a/airflow/utils/email.py b/airflow/utils/email.py
index ab3b244..57219c3 100644
--- a/airflow/utils/email.py
+++ b/airflow/utils/email.py
@@ -81,6 +81,7 @@ def send_email_smtp(to, subject, html_content, files=None,
dryrun=False, cc=None
Name=basename
)
part['Content-Disposition'] = 'attachment; filename="%s"' %
basename
+ part['Content-ID'] = '<%s>' % basename
msg.attach(part)
send_MIME_email(SMTP_MAIL_FROM, recipients, msg, dryrun)