bamboo icon indicating copy to clipboard operation
bamboo copied to clipboard

Content ID specified with attachment is not sent with message

Open dabaer opened this issue 4 years ago • 1 comments

Hello,

I'm attempting to get CID working with emails sent using the SMTP adapter, however when I attach a logo for example

put_attachment(%Bamboo.Attachment{filename: "logo.png", data: logo, content_type: "image/png", content_id: "headlogo"})

the content ID i specified does not get sent with the message:

Content-Type: image/png; name="logo.png"
Content-Disposition: attachment; filename="logo.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: 3318558395

From the documentation i've read with both Bamboo and Bamboo SMTP this would seem like the correct way for me to specify a CID, however it does appear on the email client side.

What is the correct way to achieve this?

dabaer avatar Jan 05 '21 22:01 dabaer

Hi @dabaer, thanks for opening this issue. I believe the setting of the content ID would be something that the adapter needs to handle. When you say the SMTP adapter, I'm guessing you mean https://github.com/fewlinesco/bamboo_smtp, right?

If that's the case, I think you might have to open an issue in that repo. At a quick glance, it seems like that there is a case when that adapter sets the content-id. But I don't know if that's sufficient for your case. See this line, which was added in this commit.

germsvel avatar Feb 15 '21 13:02 germsvel