I have a requirement to send inline images in HTML email using SingleEmailMessage.
I seem to be stopped by an unresolvable problem caused by a gap in the Salesforce API.
Inline images require me to use a Content Id of the embedded image as the src of the image:
And to attach the image to the email as a file attachment with the mime content id the same as I used in the img src attribute.
Unfortunately Salesforce does not seem to provide me with a property by which I can set the content ID of an attached file (it lets me pick the filename and interesting a boolean flag indicating if the image is 'inline').
Has anyone solved this problem before without resorting to a Amazon SES or Sendgrid callout?