Closed DevPan29 closed 3 years ago
Hmm, in frankly speaking, nested mail is a folder in archive
.
Thus if we want to extract a nested mail from .msg
file: extract specific folder (and subordinates files/folders) from .msg
and repack them to new .msg
.
.msg
archive format is called as Compound File Binary Format - Wikipedia. This format is also used on familiar .doc
, .xls
, .ppt
files.
Currently msgreader will only read Compound file. We need additional method to write down new Compound file.
For visualization purpose 7-Zip can be used, against test/msgInMsg.msg
:
https://github.com/HiraokaHyperTools/msgreader/blob/master/test/msgInMsg.msg
For confirmation, the intention is to extract nested mail as an .msg
file?
Hi @kenjiuno ,
yes, now I need to extract the email attached as an .msg file (probably, I'll decide to parse also the attached mail, but for now I don't need it).
I would like to manage the attached mail, as a all the other attachments.
Infact, I found this problem because the _attached _mail__ exist in the object testMsgInfo.attachments
, but if I try to get it through testMsg.getAttachment(index)
, I receive the problem above.
Kind regards. Alessandro.
@kenjiuno I am also trying to extract the .msg file that is attached and then process it. My use case is a nested .msg file that is an attachment of another .msg file
Ok
1.6.5
will be able to expose embedded msg into another independent msg.
https://www.npmjs.com/package/@kenjiuno/msgreader
Great @kenjiuno , I'll try it as soon as possible and I'll back to give you a feedback.
it works perfectly. thank you @kenjiuno
Hi all, I was trying to parse a mail that contain another mail as attachment. Trying to parse the mail attached and getting his content through getAttachment function I get this error:
this is the snippet related to the attachments parsing
This code works with all kinds of attachments but doesn't work with mail as attachment. Trying to debug the library I see that during fieldsDataDocument function, this kind of attachment haven't any fieldClass equal to _ATTACHMENTDATA: '3701' so the dataId isn't properly set.
This library is awesome. Would be great if would exist support for nested mail as attachment