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

Free Support Forum - aspose.com

Thunderbird + Local Folder Tags and seen mark

Hello everyone,
i need to migrate Thunderbird local archive (local storage)with all informations to Office365.
I already did half app, write Folders/Emails and all informations that i need to Office 365 is not a problem… i need one lib to read direct from thunderbird Structure/Email/Flag/Seen for finalize my app.
Java App
Regards C.

@galvy

There is no separate DLL to read data from Thunderbird. You need to use Aspose.Email APIs to read data from Thunderbird and write it to Office365. Please refer to the following articles for more details.
Programming with Thunderbird
Working with Exchange Mailbox and Messages

Can I read “seen” status of all emails?
Can I read “Tag” list?
Can I read Tag association - emails ?

@galvy

We have logged a ticket for your requirement in our issue tracking system as EMAILNET-40527. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@galvy

The Aspose.Email API is not responsible for it. However, you can read the list of Thunderbird tags by parsing the pref.js file in their Thunderbird account.

These settings (isRead instead of “seen”) can be retrieved using the Aspose Email API as shown in the code below and parsed according to the documentation found in the attached Mozzila.txt file. Mozilla.zip (1.5 KB)

string fileName = @"C:\Users\Alecs\AppData\Roaming\Thunderbird\Profiles\5pdxpwkp.default-release\INBOX";
using (FileStream stream = new FileStream(fileName, FileMode.Open, FileAccess.Read))
using (MboxStorageReader mboxReader = MboxStorageReader.CreateReader(stream, new MboxLoadOptions()))
{
    foreach (MailMessage eml in mboxReader.EnumerateMessages())
    {
        string xMozillaStatus = eml.Headers.Get("X-Mozilla-Status");
        int status = 0;
        bool isRead = false;
        if (!string.IsNullOrEmpty(xMozillaStatus) && int.TryParse(xMozillaStatus.TrimStart('0'), out status))
        {
            isRead = (status & 1) == 1;
        }

        string xMozillaStatus2 = eml.Headers.Get("X-Mozilla-Status2");
        string xMozillaKeys = eml.Headers.Get("X-Mozilla-Keys");
        string[] tags = string.IsNullOrEmpty(xMozillaKeys) ? null : xMozillaKeys.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
    }
}