+ Start a Discussion

Email attachment CID

How do I access the cid that comes with an email attachment? For example, I have two <img> tags in my email, with their src of cid:something here.


And then in the last part of the email:


Content-Type: image/png
Content-Transfer-Encoding: base64
Content-ID: <chart_01Z30000000VWm7_1266606255000_6.png>
X-Attachment-Id: 0.7






My question is, how do I access the Content-ID in Apex EmailAttachments (or any other class) so that I can save that content ID on a particular custom object's field I created?


The cid is in the body in the HTML (in the IMG tag), that's why it knows which image to display where, but I want to access the attachment's content-id so that I can match the IMG tag to its content-id manually.