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

Free Support Forum - aspose.com

2 bugs in attachment class

Hi,
Please run my sample, it will load my winmail.dat and will show each attached file’s .Name and .IsEmbeddedMessage property
You will see 2 bugs:

  1. The .Name of Save 40% and impress every audience.msg is shown incorrectly (without .msg extension)
  2. IsEmbeddedMessage is incorrectly returning False for all types of messages I’ve attached to this TNEF.
  • I’ve created this TNEF using Outlook 2021 build 16.0.15128.20264, and not using any 3rd party SDK.

WindowsApplication1.zip (1.2 MB)

@australian.dev.nerds

We have logged this problem in our issue tracking system as EMAILNET-40811. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@australian.dev.nerds

It is to inform you that the issue which you are facing is actually not a bug in Aspose.Email. So, we have closed this issue (EMAILNET-40811) as ‘Not a Bug’.

The IsEmbeddedMessage property is true when the attachment has content type “message/rfc822”. This happens when converting from msg(TNEF) if the attachment is added as an Outlook message. Only messages in MSG format can be added as Outlook messages. In the source file, all attachments are added as a byte array.

The message named ‘Save 40% and impress every audience’ does not contain any extension. Please check the attached image. attachment detail.jpg (607.0 KB)

1 Like

Hello,
1st, I didn’t create the TNEF myself, automatically created by latest Outlook version.
2nd, you mean IsEmbeddedMessage = True If Content-Type = “message/rfc822”?
So ole2 msg/oft or emlx / other message types are not considered as embedded message? Not wise IMO.
3rd, if you say it’s based on the Content-Type, assume the message does not have any extension at all, should not make a difference right?

Finally, if we forget all the above, do you have a full recursive TNEF extractor code sample? This was what I was going to write! To extract ALL the files inside the TNEF recursively, to process all the message types attached, among with all inner attachments. Possible?

@australian.dev.nerds

Yes, your understanding is correct.

The reported issue was that the Attachment.Name and Attachment.IsEmbeddedMessage returns incorrect values. After analysis, we found that the message named ‘Save 40% and impress every audience’ does not contain any extension.

Yes, your understanding is correct.

Regarding extracting the embedded object, please read the article : Working with Attachments and Embedded Objects.

Well, can you please re-consider this logic?
As well as the other attachments which HAVE correct extensions are also returning IsEmbeddedMessage as False.

Misunderstanding! I meant how do you claim the extension based detection vs content based? Anyway…

Useless, can’t imagine to write a full depth recursive attachment extractor using the current SDK structure / limitations. :frowning:

@australian.dev.nerds

Please share your input file that contains the embedded object with and without extension. We will investigate the issue and provide you information on it.

We have closed the ticket EMAILNET-40811 as ‘Not a bug’. The message named ‘Save 40% and impress every audience’ does not contain any extension.

With Aspose.Email, you can extract the embedded objects. Please let us know the issue that you are facing while extracting the attachments.

Since the real support engineer is not directly engaged, such misunderstandings can occur, OK let’s forget about that attachment, there are more files attached marked with RED in your snapshot:
attachment detail.jpg (643.1 KB)

@australian.dev.nerds

Following is the detail of EMAILNET-40811 after analysis.

This issue was closed as ‘Not a bug’ because there is no extension in your input file.

The IsEmbeddedMessage property is true when the attachment has content type “message/rfc822”

We have logged separate ticket for your case as EMAILNET-40861 for further investigation. You will be informed once there is an update available on it.