This was just an example. You can do whatever you like with the bitmap.
Thank you Erel. I think I have been wanting to do something that is not possible. I have created an app that is built around the MailParser. I load M.Body into an array using the code below. As you can see M.Body must be a string.
Dim M AsMessage
M = MailParser.ParseMail(MessageText, File.DirRootExternal & "/MPtemp")
arraySubject(MsgIndex) = M.Subject
arrayFrom(MsgIndex) = M.fromfield
arrayBody(MsgIndex) = M.Body
Later in my code M.Body is retrieved from the array, and displayed in a WebView. So far, with the exception of AppleMail, I can parse the body of mail recieved, whether it be html, quotedprintable or plain text etcetera, into a string. Not being interested in exposing clickable attachments to the user, this has been fairly simple.
My app is not intended to be a full blown email client. It is used to review mail on the mail server, prior to downloading with an email client. The headers are displayed in a ScrollView. The user can select those messages they wish to delete from the server, by checking an associated CheckBox in the Subject (left) column. A long press on any item in the From (right) column will display the message body for that item in a WebView, for assessment by the user.
While I would prefer to display the entire message body, text and images, if this is not possible in this instance, I would like to extract the text into a string and ignore the images. I have tried to attach a file that contains four images, each of which is preceded by a line of text, unfortunately the file is too large to upload. Except that it contains four images instead of one, it is in the same format as the file uploaded in Post #1 above.
How can I ignore the images and extract only the text from such a file?
I have attached two image files showing the interface of my app. I’ve been trying to keep it both simple and intuitive, and in doing so may have created an issue I can’t overcome. Help is greatly appreciated.
EDIT: Parsing as MultiPart extracts the text portion, and answers my last question. I still would like to display the entire message body, including images, but I can't find a way of doing that.
multipart = True
If FindBoundary(line) = False Then
line = ReadNextLine(Mail)
FindBoundary(line)
End If
Regards