You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, think there's an issue with inline images and the Content-ID tag. When using the default Django mailer, I can attach an image like this and all is well:
with open(attachment_path, "rb") as image_file:
msg_img = MIMEImage(image_file.read())
msg_img.add_header('Content-ID', '<{}>'.format(filename))
msg.attach(msg_img)
The message comes through with inline images, and the Content-ID tag set appropriately, like:
That doesn't render, since it's not the correct format, and the images are just attachments instead of inline. I'm guessing the underlying sendgrid lib is the one adding the extra angle bracket, so to maintain API compatibility with Django's default mailer this lib probably has to strip existing brackets on the attachment?
The text was updated successfully, but these errors were encountered:
Hey, think there's an issue with inline images and the Content-ID tag. When using the default Django mailer, I can attach an image like this and all is well:
The message comes through with inline images, and the Content-ID tag set appropriately, like:
When I do the same thing with this lib, those Content-ID angle brackets are doubled up, like:
That doesn't render, since it's not the correct format, and the images are just attachments instead of inline. I'm guessing the underlying
sendgrid
lib is the one adding the extra angle bracket, so to maintain API compatibility with Django's default mailer this lib probably has to strip existing brackets on the attachment?The text was updated successfully, but these errors were encountered: