ContentType.Name Null for Embedded Images

Hi,

I am experiencing an issue when trying to access ContentType.Name of an email message’s embedded image. The issue only appears to happen when the image embadded was a bmp. In these instances ContentType.Name returns an empty string.

Example code-

Assembly Aspose.Email, Version=17.11.0.0

if (message.LinkedResources != null && message.LinkedResources.HasItems())
{
foreach (LinkedResource resource in message.LinkedResources)
{
using (MemoryStream stream = new MemoryStream())
{
resource.Save(stream);
if (stream.CanSeek)
{
// Reset the stream position since we just saved to it
stream.Seek(0, SeekOrigin.Begin);
}
string fileName = resource.ContentType.Name;…

As I stated above it is only some email messages and I have examples.

Any assistance would be appreciated.

Cameron Roberts

@CamRoberts,

Please share a sample message file with us having embedded images in it. We will evaluate it with the latest version of API and update you about our findings.

Hi Ikram,

Thank you for the quick response. I cannot upload an msg per your upload control restrictions but the file can be found here.

[https://drive.google.com/file/d/1hNA1MV2MDsPr9bdIbvrt8sOQ8EUMIHBe/view?usp=sharing ](https://drive.google.com/file/d/1hNA1MV2MDsPr9bdIbvrt8sOQ8EUMIHBe/view?usp=sharing)

Thank you,
Cameron Roberts

@CamRoberts,

Thank you for providing the sample file.

This issue is observed here and logged under ID:EMAILNET-38928 in our issue tracking system 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-38928) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by kashif.iqbal