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

Free Support Forum - aspose.com

Detect Mboxo vs Mboxrd

When loading Mbox, how to distinguish if it’s Mboxrd or Mboxo? (not by possible extension, but by content) any method for that?


We have logged this requirement in our issue tracking system as EMAILNET-40824. We will inform you once there is an update available on it.

1 Like

Hi, the reason is on loading mbox, when to use Mboxo and when to use Mboxrd reader?
*DetectFileFormat does not distinguish it.


We have logged your concerns in our issue tracking system. We will inform you once this issue is resolved.


You can use CreateReader method to create a reader. It automatically detects the format (Mboxo or Mboxrd) and creates an object of the corresponding class (MboxoStorageReader or MboxrdStorageReader).

Dim reader = MboxStorageReader.CreateReader("my.mbox", New MboxLoadOptions()) 

For Each eml In reader.EnumerateMessages()

' do something 
1 Like

Thanks so much, very helpful, however, it’s done internally, how can I detect the sub-format of mbox?
DetectFileFormat will return .mbox for all 4 variants, and also the above code, since mbox CL/CL2 is not supported, it’s better to be able to detect them at least!

I think adding this to DetectFileFormat so it will return MboxRD/MboxCL/MboxCL2 will not be accepted since they’re sub-formats, but another way available?


The CreateReader automatically detect the formats. Could you please share the complete detail of your use case in which you want to identify MboxRD/MboxCL/MboxCL2? Thanks for your cooperation.

Mostly need to distinguish between MboxO and MboxRd (which is supported by Aspose) but would be nice to detect all 4 formats (not adding support for reading those remaining 2, but just detect their inner format)
Although AFAIK to detect the internal format, the difference would be their separator.

Anyway, as you said, the CreateReader automatically detect the formats (MboxO vs MboxRd)
So, it seems as easy as ABC to add a property to show it to user.
Like .MboxFormat
With Enum:

Or, if you find it useless, please kindly advise if there’s a workaround to detect it?
Thanks, I’d appreciate it :slight_smile:


I agree, it’s a useful feature. Created a ticket. Thanks.

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

  Issue ID(s): EMAILNET-40907

You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.