MSGs attached to MSG show as zero byte attachments in Outlook

Hi.
I’m using Aspose.Email for .NET 20.4.0 in evaluation.
When I attach an MSG to an MSG using the sample code shown here:

the resulting attached MSG shows as a 0 byte file in Outlook. However, the attached MSG file has size >0 and when the MSG attachment is opened in Outlook it displays correctly.
What do I need to do to get Outlook to display the true filesize of the attached MSG?

Many thanks,
Philip

@philip.crooks,

I have observed the issue shared by you and request you to please share the source MSG file, attachment file and generated output for reference. Please share the requested information so that I may proceed further with investigation on my end.

Hi,

I now have a working alternative (see below) but for your reference I’ve attached sample MSGs:
RESULT New Paths for New Stuff.msg
is the result of attaching
UBSW ENERGY KICK-OFF CELEBRATION.msg
to
New Paths for New Stuff.msg
using:
message.Attachments.Add("UBSW ENERGY KICK-OFF CELEBRATION.msg", MapiMessage.FromFile(attachmentFilePath))
as in this sample code:

However, I’ve found that attaching using File.ReadAllBytes(attachmentFilePath) instead of MapiMessage.FromFile(attachmentFilePath) results in the correct filesize shown for the attached MSG in Outlook, so I will use this variaton instead:
message.Attachments.Add("UBSW ENERGY KICK-OFF CELEBRATION.msg", File.ReadAllBytes(attachmentFilePath))

Thanks & regards,
Philip

SampleMSGs.zip (16.4 KB)

@philip.crooks,

I have read your comments. Can we consider the issue closed on our end now.

Yes thanks, I’ll just use the alternative method.

@philip.crooks,

Thank you for the feedback. Please share if I may help you in addressing any further issues incurring in API.