Not Saving attachments properly


I am trying to add the message as attachment to itself and save it as an .eml

I am loading it as an MapiMessage, then converting it to mailmessage

Here is the sample code that is not working.
var m = MapiMessage.Load(…);
var temp = m.Copy();
temp.Attachments.Add(m.Subject+ “.msg”, m);
var mail = temp.ToMailMessage(new MailConversionOptions())…, new EmlSaveOptions())

The above code is not working, however if we use the overloading of Attachments.Add() method it will work like this
(using MemoryStream stream = new MemoryStream()){
m.Save(stream, new MsgSaveOptions());

Is this bug, or the way it should work?

Below I will attach sample input message(.msg) and corrupted output(.emlDS_[Kotak] Economy The missing tax filers - (811.3 KB)


We have tested the scenario using the latest version of Aspose.Email for .NET 22.3 with following code example and have not found the shared issue. So, please use Aspose.Email for .NET 22.3.

MailMessage message = MailMessage.Load(MyDir + "176928152.eml");

message.AddAttachment(new Attachment(MyDir  + "DS_[Kotak] Economy The missing tax filers - Copy.msg"));
message.Save(MyDir + "out.eml", Aspose.Email.SaveOptions.DefaultEml);