I want to query email messages stored by Thunderbird from a C# application I am developing.
Currently I can get some message parts such as From address and Subject by querying the SQLite database, global-messages-db.sqlite.
SELECT subject FROM messagesText LIMIT 10;
I have not been able to locate the body of messages. I have searched for documentation of Thunderbird's storage but I can't find anything that describes where this is stored.
Where are the bodies of messages stored?
From my own experimentation, it seems you can get the list of messages with the below.
select * from messages;
In that result set, you'll notice each message has an id. To get the content of a particular message you can do the following.
select c0body,c1subject,c2attachmentNames,c3author,c4recipients from messagesText_content where docid = 1234;
This is assuming the id of the message you want is 1234.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With