Commit 0bfd733b authored by Romain Courteaud's avatar Romain Courteaud

Generate a Content-ID header for attachment, in order to allow embedded image

in HTML.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23975 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9b52d98f
......@@ -77,6 +77,8 @@ class MTMultipart(MIMEMultipart):
msg = MIMEBase(*content_type.split('/'))
msg.set_payload(data)
Encoders.encode_base64(msg)
msg.add_header('Content-ID', '<%s>' % \
''.join(['%s' % ord(i) for i in filename]))
msg.add_header('Content-Disposition', 'attachment',
filename=filename)
self.attach(msg)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment