Unable to read MBOX File from Entourage E-mail Client


#1

I am trying to view mailbox files, given code worked with all mbox files of extension .txt,.mbs,mbx and even file without extension.
but when I try to read mbox files of Entourage Email Client, it shows the count as “1” and no message is shown.
I am enclosing mbox files with this code

//code to count total no. of items in mailbox
try
{
MboxrdStorageReader reader = new MboxrdStorageReader(stream, false);

                count = reader.GetTotalItemsCount();
                reader.Dispose();
            }
            catch (Exception x)
            {
                MessageBox.Show(x.Message);
                
            }

//code to read mbox file is as:

FileStream stream = new FileStream(file, FileMode.Open, FileAccess.Read);
MboxrdStorageReader reader = new MboxrdStorageReader(stream, false);

            // Read all messages in a loop
            try
            {
                MailMessage msg = reader.ReadNextMessage();

                while (msg != null)
                {
                    //process the message
                msg = reader.ReadNextMessage();
            }

            }
            catch (Exception x)
            {
                MessageBox.Show(x.Message);
            }
            finally
            {
                if (reader != null)
                    reader.Dispose();
            }

was not able to upload .mbox file


#2

@ritadcc126,

Can you please share file via Dropbox and share link here with us.