I use MFMailComposeViewController in iOS to create a new dynamic email address, but I encountered a problem while trying to use inline images.
At first I tried to add the image to base64 encoding, i.e.
<img src="data:image/png;base64, blahblahblah" />
But I can only see that on the iPad when Outlook / Entourage ignore it, although I see it in the source!
So, now I'm trying to add an image as an attachment and link to it through its content identifier, i.e.
<img src="cid:BF6E8B41-4D74-419E-B55E-8F18A07381AE" id="BF6E8B41-4D74-419E-B55E-8F18A07381AE" width="509" height="220">
But I donβt know how to get cid via code!
When I attach an image using AddAttachmentData , the image is below and actually generates a <img /> using cid!
In addition, this identifier seems to change with each new email. One of them was my first attempt, then I sent another one, and the Content-ID was changed to
<img src="cid:59EBFDED-2A31-4787-BF67-9D9ED0FF2B39" id="59EBFDED-2A31-4787-BF67-9D9ED0FF2B39" width="509" height="220">
The reason I have to do this is because it is a dynamically generated image, and it needs to sit inside the email template.
EDIT
I'm starting to think that this is impossible. I have been studying for hours, and it looks like iOS will not let you attach an image and a link to it through its CID. Thanks Apple -_-