/// <summary> /// Loads the attachment data out of the specified storage. /// </summary> /// <param name="storage">The attachment storage.</param> private void LoadAttachmentStorage(CFStorage storage) { //create attachment from attachment storage var attachment = new OutlookAttachment(this, storage); //if attachment is an embedded msg handle differently than a normal attachment var attachMethod = attachment.GetMapiPropertyInt32(MapiTags.PR_ATTACH_METHOD) ?? 0; if (attachMethod == MapiTags.ATTACH_EMBEDDED_MSG) { //create new Message and set parent and header size OutlookMessage subMsg = new OutlookMessage(_file, attachment.GetMapiProperty(MapiTags.PR_ATTACH_DATA_BIN) as CFStorage); subMsg.parentMessage = this; subMsg._propHeaderSize = MapiTags.PropertiesStreamHeaderEmbeded; //add to messages list this.messages.Add(subMsg); } else { //add attachment to attachment list this.attachments.Add(attachment); } }
public OutlookParser(Stream stream) { _msg = new OutlookMessage(stream); }