Open mphelp opened 4 years ago
Hi @mphelp
According to that documentation, it warns that using Content ID Inline images does not always work for web-based email clients, like Gmail. The next section, Inline Embedding (Base64 Encoding), provides directions on how to attach an image inline using the Base64 encoding of that image. I recommend trying this method, since Content ID images are not working for you on those email clients.
@eshanholtz It turns out that I wasn't including the "disposition" and it defaults to attachment and not inline. After setting it to "inline," the images show up inline in Gmail, Outlook, and iCloud!
attachment.disposition = Disposition('inline')
Note: The attachment use case in this repo doesn't cover inline attachment. It'd be good to include one. Do you agree? If so I could provide a code sample that matches the other use case examples.
I agree that would be a very helpful example to include. Please submit a PR for review! Thanks!
@thinkingserious and other great package maintainers:
Inline image CID troubles!
I am able to successfully attach the PNG image. However, I cannot get it to appear inline in Gmail, Outlook, or iCloud. NOTE: Previews do show in Gmail and iCloud. But no previews in Outlook. As an aside, iCloud shows the image alt. The emails are sent successfully otherwise.
Mail obj dump
I was following THIS documentation: https://sendgrid.com/blog/embedding-images-emails-facts/
Technical details: