On Apr 29, 3:55*pm, Neil wrote:
> Teemu Hautala wrote:
> > [...] but for some
> > reason the folder listener doesn't do anything for sent events in IMAP
> > Sent folder.

> Depending on your preferences and version of Thunderbird, your Sent
> folder may not be automatically synchronised with the server, so that
> although the Sent mail has been copied to the server, the local summary
> does not know about it yet.

I wanted to achieve something similar in my code. My solution was to
the Sent folder programatically every 30 seconds. The code below is
part of
a script overlayed of messenger.xul. It calls updateFolder on every
folder that
has the SentMessageFolder flag set.

You could change it to check for the type of server, but in my setup
it works ok.



// check the 'Sent' folders for new mail every 30 seconds
window.setInterval(function () {
for (var i = 0; i < accountManager.allServers.Count(); i++) {
var server;
if ((server = accountManager.allServers.QueryElementAt(i,
Ci.nsIMsgIncomingServer)) !== null) {
var sentFolders = server.rootFolder.getAllFoldersWithFlag
(512); // SentMessageFolder
if (sentFolders.Count() === 1) {
var sentFolder = sentFolders.QueryElementAt(0,
}, 30000);