Application is trying to draft a reply to the existing email stored in msg format in the database. The draft email in reply mode opens in Outlook from the application.
Application reads email (msg) from the database, opening it in reply mode (MapiMessage) and then set reply-to header to include all the recipients (To and CC). The email shows-up in edit mode in Outlook for the user, but when the user clicks on the Options menu to check “Direct reply to”, the Outlook crashes. Below is the sample code, please check what is wrong? Note that if we comment out the code the code for setting reply-to header there is no issue.
MapiMessage originalMessage = null;
originalMessage = MapiMessage.FromStream(new MemoryStream(objFileData));
foreach (var item in originalMessage.Recipients) //Adds all the recepients to ReplyTo header
originalMessage.ReplyTo += "; " + item.EmailAddress;
MemoryStream msgBuffer = new MemoryStream();
messageBytes = msgBuffer.ToArray();
package id=“Aspose.Email” version=“20.5.0” targetFramework=“net472”