Property Loss: MapiMessage saved as attachment (embeeded message) to other MapiMessage

I have a MapiMessage. There are about 100+ properties with that. When I try to add it as attachment to other MapiMessage there is property loss. Only 15+ properties are present other are loss. Is not embedded message as attachment treaded as a full MapiMessage?

@ksem,

We’ve applied the following code to your case:

string fileName = Path.Combine(path, "attach.msg");
MapiMessage attachMsg = MapiMessage.Load(fileName);
MapiMessage msg = new MapiMessage("test@test.com", "test@test.com", "Message with embedded MSG", "This is a body");
msg.Attachments.Add("attachMsg.msg", attachMsg);
msg.Save(Path.Combine(path, "test.msg"));

and haven’t found any problems. All the properties of the embedded message are saved properly.

You may have mixed up attachment properties with the message properties that is an attachment by itself. Consider the following code, it must help you understand the difference:

var attachProperties = msg.Attachments[0].Properties; // it is an attachment properties

// If an attachment is a message, then the ObjectData property is not null.

var embeddedMessageProperties = msg.Attachments[0].ObjectData.Properties; // it is an embedded message properties

I hope the above information will be helpful. Feel free to contact Aspose support any time you need help.