We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Plain Text format email unable to append the original Email content rather than only additional new contents available

We are facing an issue with appending an existing email content to New mail message object when existing Email file was created or send as Plain Text format. Actually the while debug the existingEmail object has its own entire body content and when it was send to create a new MapiMessge with reference to New Mail message object the output returns with only additional contents and original existing email content got disappeared for Plain Text. Could you please support us on this how to resolve it.
The following code we have used

newMailMessage.IsBodyHtml = existingMailMessage.IsBodyHtml;

if (newMailMessage.IsBodyHtml)
newMailMessage.HtmlBody = existingMailMessage.HtmlBody + “<p style=“margin:0em;”>” + System.Web.HttpUtility.HtmlEncode(bodyTags).Replace("\r\n", “

<p style=“margin:0em;”>”) + “”;
newMailMessage.Body = existingMailMessage.Body + bodyTags; // bodyTags string builder used to append customized content with existing email content

using (MapiMessage mapiMessage = MapiMessage.FromMailMessage(newMailMessage))
// set draft status mapiMessage.SetMessageFlags(MapiMessageFlags.MSGFLAG_UNSENT);
fileReference = Guid.NewGuid().ToString() + “.msg”;


To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input file.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

Many thanks for your response Tahir, I have managed to found out the issue into my code. Looks like some where Mailmessage body IsHtmlBody sets with True even though it was Plain Text format, now that was resolved with using the existing email IsBodyHTML property to NewEmailMessage object. Once again many thanks for your effort.


Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Email, we will be happy to help you.