I am converting .partial.emlx to .eml using Aspose.Email for .Net under Mac OS(High Sierra). Library converting only mail’s body and its headers(Subject, To, CC, Date .etc). But it is not converting its attachment which is saved in 75590.2.emlxpart in encoded form by Apple mail.
We have logged this issue with ID “EMAILNET-39219” for further investigation. You will automatically be informed here once we have more information to share.
We have investigated this issue and found that this is not a bug of Aspose.Email. For various versions of the MAC, the paths for saving partial files, their names and formats may be different, therefore it is a very difficult task to implement the general case. However, you may use the following code to correctly convert files to EML format:
var filename = Path.Combine(TestUtil.GetTestPath("EMAILNET_39219"), "80394.partial.emlx");
var lrFilename = Path.Combine(TestUtil.GetTestPath("EMAILNET_39219"), "80394.1.2.emlxpart");
var attFilename = Path.Combine(TestUtil.GetTestPath("EMAILNET_39219"), "80394.2.emlxpart");
MailMessage message = MailMessage.Load(filename, new EmlxLoadOptions());
message.LinkedResources[0].ContentStream = new MemoryStream(Convert.FromBase64String(File.ReadAllText(lrFilename)));
message.Attachments[0].ContentStream = new MemoryStream(Convert.FromBase64String(File.ReadAllText(attFilename)));
message.Save(filename + ".eml");
Moreover, please feel free to write back to us if you need additional information or you have any further queries.
I have to convert each file (.partial.emlx) on run time using my tool. There may be many numbers of files. I search file into directory(which can contain .emlx, .partial.emlx, .emlxpart) one by one and after getting one I convert it and repeat this again and again. So please tell me the solution for run time.
The given below statement is combining the path of directory and the file whereas “EMAILNET_39219” is representing the directory that we have created locally to test this issue. You may use your custom path to specific file.