Archived Forum Post

Index of archived forum posts

Question:

Get mime from email

Apr 05 '13 at 15:30

Hi guys.

Could you please help me with this question. I have a mime object. At first I print the [mime getbodyDecoded]. It prints the correct message. Then I create a CkoEmail object and set it the mime of my mail via setMimeObject function. then I get the mime of new created email object CkoMime* mime = [email getMimeObject]. After printing the [mime1 getBodyDecoded] I get the incorrect message.

Then I tried to use AttacheMessage and LoadMimeBites functions. In this case I get the empty body for mime1 object.

Thanks in advance....


Answer

Compare the original MIME with the MIME you get back from the email object. You can examine the full MIME source of a CkoMime object by calling the [mime getMime] method.

When the email object loads MIME, it may transform the MIME into a more standardized structure that conforms to how major email programs would structure MIME (such as Mozilla Thunderbird or Outlook). When an email object loads MIME, it breaks it down and stores it within an internal object model. When re-compose the MIME of an email by calling [email getMime] or [email getMimeObject], it's re-building the MIME from the internal object model, and therefore it could be different.

Compare the MIME before and after, and it could shed light on the problem...