I'm trying to create an extension to Thunderbird that is able to export a mail message into a document management system. To do this I need to extract the message body as well as any attachments that may be included in the mail; however I am still struggling with the xpcom object model. I have figured out that I can get an array of URIs of the messages selected by the user, and that I can use a nsIMsgMessageService to get a nsIMsgDBHdr (which is good, since the latter contains a lot of information I need, like subject, sender, receiver etc.). But I still don't quite see how to gain access to the actual text of the message body or any of the attachments.
All I have been able to do so so far is to save the message in its raw form (i.e. a single file with mime-encoded attachments) but I need to somehow separate the attached files before handing them over to the target system. There is this nsIMsgMessageFetchPartService.fetchMimePart(...) method which looks promising, but it seems to require me to already have a valid URI identifying a mime part of the message in question... but how would I actually obtain those? Looking forward to any responses... _______________________________________________ Mozilla-xpcom mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-xpcom
