function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dnakonidnakoni 

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

 

BASE64 DATA HERE

 

 

 

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.

 

Thanks.