Sorting text and attached images in MFMailCompositeViewController?

Posted by eOgas on Stack Overflow See other posts from Stack Overflow or by eOgas
Published on 2010-06-10T21:49:42Z Indexed on 2010/06/10 21:52 UTC
Read the original article Hit count: 168

In the app I'm currently writing I'd like to populate the message body of an e-mail with a combination of text and images. It took me forever to find out that in order to get an embedded image, you had to have bold tags in the message body (...uhhh, yeah), otherwise the image just shows up as an attachment. But now I have the problem that all of the images just go to the end of the body, and I can't programmatically put text after or in between any of the attachments.

So far I've tried:

  1. Adding images as part of the body string using tags and a base64 string. This would have worked, but most e-mail clients reject images embedded in this manner.

  2. Using normal tags with a references to the attached files, using the assigned filenames. Didn't work at all.

  3. Attaching images normally, but also attaching blocks of text to the e-mail. The text is not embedded in the same manner as the images. Turns out to be an attached txt file on the receiving end.

Apple has restricted their MFMailComposieViewController class to the point of ridiculousness, but I know there has to be a way to do this, because they add in their stupid "Sent from my *apple device name here*" message at the end of every e-mail.

So does anyone have any ideas?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about email