Archived Forum Post

Index of archived forum posts

Question:

message/rfc822 attachments?

Nov 26 '12 at 18:41

If I get an attachment with message/rfc822 content type, is there a convenient function in Chilkat to get the HTML formatted text to append to the body? The message may contain multiparts that have more messages, so it needs to be recursive.


Answer

In the Chilkat Email API, a MIME sub-part that is message/rfc822 is not considered an attachment, it's considered an "attached message". The emailObject.NumAttachedMessages property will indicate the number of immediate attached messages. The emailObject.GetAttachedMessage(index) will return the Nth attached message as an email object, from which you can get its plain-text/HTML bodies, attachments, and attached messages. You can see how this would be recursive...