Issue with MBOX Extraction - Images in Email Body not Extracted as Files

Hello Aspose Support Team,

I hope this message finds you well.

I am currently using Aspose.Email for .NET to extract emails and attachments from MBOX files. While this process is working well for most cases, I have encountered an issue with Images and logos in the body of the email.

The problem is that when I extract emails from MBOX file, the images in the body of the emails are not being extracted along with the attachments. In contrast, when I use Aspose.Email for PST extraction, the images in the email body are extracted as separate files, along with other attachments and logos in the signature.

I have attached the one such problematic MBOX file for your reference: signature.zip (209.5 KB)

Here is the code I am currently using for the MBOX extraction:

     var mboxLoadOptions = new MboxLoadOptions
    {
        LeaveOpen = false,
        PreferredTextEncoding = Encoding.UTF8
    };

    var emlLoadOptions = new EmlLoadOptions
    {
        PreserveEmbeddedMessageFormat = true,
        PreserveTnefAttachments = true
    };

    using (var mbox = MboxStorageReader.CreateReader(Inputfile.Mbox, mboxLoadOptions))
    {

        foreach (var messageInfo in mbox.EnumerateMessageInfo())
        {
            var eml = mbox.ExtractMessage(messageInfo.EntryId, emlLoadOptions);
            eml.Save("Outputfilename" + ".eml");
            GetAttachmentsfromEML(eml);
        }
    }


    void GetAttachmentsfromEML(Aspose.Email.MailMessage eml)
    {
        if (eml.Attachments.Count() >= 1)
        {
            foreach (var attachment in eml.Attachments)
            {
                string filename = SanitizeFilename(attachment.Name);
                attachment.Save(filename);  
            }
        }

    }

Hello @ATS,

Since the images are embedded in the body of the message, you should find them in the LinkedResources collection.

Let us know if it helps.
Thank you.

This helps, Thanks for the support
I am able to get the Images from the Body of the Email in MBOX extraction

Is there any way to get the ICONs or Logos in Signature as separate documents like above?

Hello @ATS,

Since the signature is a part of the message body, you should access them in the LinkedResources collection as well.