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

Free Support Forum - aspose.com

Subject: appears when it should not

I start with an unsent Outlook message with a blank Subject. If I open its msg file inside a MailMessage, the msg.Headers collection contains just one item, "X-Unsent" which is an integer value set to 1.

If I save the msg contents to a MemoryStream in DefaultMhtml format (which puts MIME content in the stream) and then use that stream to construct a Aspose.Words.Document object, there is a line that starts with the word Subject: followed by 20 or so spaces, but there is no actual subject text. The other email header items like Sent:, From:, etc. do not appear because they were not present in the original email.

I think it is a bug that Subject: appears in the generated Document object because there is no Subject in the email I started with.

I'd prefer not to have to write special-case code to handle the fact that aspose treats Subject: differently to other email header items.

Hi Brian,

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

  • Your input msg file
  • Please attach the output mhtml that shows the undesired behavior.
  • 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'll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip them and Click 'Reply' button that will bring you to the 'reply page' and there at the bottom you can include any attachments with that post by clicking the 'Add/Update' button.

As requested, I've attached a zip file containing a console app that demonstrates the problem.

You'll need to modify it slightly to specify the path to an aspose .lic file.

Note: You have to use the Licensed version of aspose because if you use the Evaluation version the created MIME content has had the blank Subject line changed to "evaluation copy" which defeats the purpose of the test.

Put the path to .\files\Case 3054.msg (which is an unsent email with a blank subject line) on the command line and step the code in the debugger. It will create a memory stream with MIME content and save it to disk using a temp file name. Open that file and you'll see the MIME header contains a blank Subject:

Then the console app uses the MIME memory stream to construct a Document, which also gets saved to a temp file. Open the generated file in Word and you'll see an empty Subject line.

When the MailMessage writes MIME content, if there's no From: or To: or Sent: in the msg then these get omitted from the MIME. I think if the Subject is blank it should be left out of the MIME too.

Hi Brian,

Thanks for sharing the detail. Your query is related to Aspose.Email. I am moving this thread in Aspose.Email forum where you'll be guided appropriately.

Hi Brian,


We are working on this issue and request you to send us the Case3054.zip file again, as we are getting error while downloading it. Your patience and understanding is appreciated in this regard.

I’ve uploaded the zip again, and when I r-click it in the forum I can save it from there to my local machine. Try again your end.

Hi,


Thank you for providing the sample code and file. Issue is re-produced here and logged under Id: EMAILNET-35199 for further investigation by the product team. You will be automatically notified once any update is received in this regard.

The issues you have found earlier (filed as EMAILNET-35199) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.