Hello,
Hi Scott,
// Open the storage file with FileStream
FileStream stream = new FileStream(@“Mbox_Storage_File.mbox”, FileMode.Open, FileAccess.Read);
// Create an instance of MboxrdStorageReader class and pass the stream
Aspose.Email.Formats.Mbox.MboxrdStorageReader reader = new Aspose.Email.Formats.Mbox.MboxrdStorageReader(stream, false);
// Start reading messages
MailMessage message = reader.ReadNextMessage();
int i = 0;
// Read all messages in a loop
while (message != null)
{
// Manipulate message - show contents
Console.WriteLine("Subject: " + message.Subject);
// Save this message in EML or MSG format
message.Save("Eml "+ i + “.eml”, MailMessageSaveType.EmlFormat);
i++;
// get next message
message = reader.ReadNextMessage();
}
// Close the streams
reader.Dispose();
stream.Close();
Thanks for the reply.
I think I now see the problem. In doing some research, it appears there are four major types of MBOX implementations:
- MBoxO
- MBoxRD
- MBoxCL
- MBoxCL2
Hi Scott,
Could you please provide us with a sample Mbox file that can’t be read using Aspose.Email? We’ll investigate it further and assist you accordingly.
I have several thousand MBox files in the MBoxO (Eudora) format. If I manually change the ???@??? delimiter to a - (dash), then ASPOSE will process them, otherwise it simply skips the file.
Changing them by hand is not practical.
Is there a fix or release that will address MBoxO files available yet?
Hi Daniel,
Aspose.Email.Formats.Mbox.MboxrdStorageReader reader = new Aspose.Email.Formats.Mbox.MboxrdStorageReader(stream, false);
This Code is not working in java
It gives compile time error : Aspose cannot be resolved to a type
Formats are now under FileFormatType but if you are looking to read .Mbox then please use the following code snippet.
using (FileStream stream = new FileStream(dataDir + "ExampleMbox.mbox", FileMode.Open, FileAccess.Read))
using (MboxrdStorageReader reader = new MboxrdStorageReader(stream, false))
{
MailMessage msg;
while ((msg = reader.ReadNextMessage()) != null)
{
long currentDataSize = reader.CurrentDataSize;
msg.Dispose();
}
}
can you tell me how to convert mbox file to pst file
i am using this method of java email
PersonalStorage storage = MailStorageConverter.mboxToPst(“C:\Users\DELL\Desktop\mbox6.mbx”,“C:\Users\DELL\Desktop\output.pst”);
But, it’s not working properly.
We have tested this with latest version of Aspose.Email for Java i.e 18.9 and it is working fine.
Please try with latest version and if the issue still exist then kindly share sample MBX file that you are trying to convert.
It seems no issue. Please find the converted PST file here:
https://www.dropbox.com/s/7kodmh0s3hf89il/mbox_output.pst?dl=0
Converted using the following code sample:
PersonalStorage storage = MailStorageConverter.mboxToPst(dataDir + "mbox6.mbx","D:\\32683\\output.pst");
Moreover, you may try with FileInputStream by reading MBX in stream and then passing stream to convert method.
this pst file size is 265kb whereas my mbox file size is 19mb and i have checked this file on outlook 2003, it doesn’t showing any mail in it.
We have logged this issue with ID “EMAILJAVA-34437” for further investigation. You will automatically be informed here once we have more information to share.
can you tell me when this issue could be resolved, because i am thinking to buy this api
We are working on this issue and we will update you as soon as we have more information to share.
This issue has been resolved and we have prepared a hotfix release for you. Please download the release at this link and provide your feedback:
https://www.dropbox.com/s/jktt2unl6mfkynw/aspose-email-18.9.2-java.zip?dl=0
The issues you have found earlier (filed as EMAILJAVA-34437) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan
hi team,
when i am converting pst to mbox , there is a folder “Journal” , this folder in not converting into mbox , It throws an exception :
Exception in thread “Thread-5” class com.aspose.email.system.exceptions.KeyNotFoundException: The given key was not present in the dictionary.
com.aspose.email.system.collections.generic.Dictionary.get_Item(Unknown Source)