Event triggered on add of message to TB folder?
9 posts
• Page 1 of 1
I would like to have an action triggered whenever a message (or messages) are added to a TB folder, whether they're copied there manually or end up there through the application of a filter.
Specifically, I'd like the incoming message to be copied to a location in 'Local Folders' for safekeeping. I haven't found anything like this yet, and it's unclear if there's even an event API that covers this sort of thing, to which I could subscribe a hook. Any pointers would be extremely welcome! Thanks.. ![]() Perhaps you haven't considered using Message Filters for that purpose.
I have, but as I described, they don't fit the bill. Dragging a message to a folder by hand isn't going to trigger a filter action. Filters work on where the message originates; I need something that acts when the message arrives in a destination folder.
![]() How is the account set up in Thunderbird, as POP or IMAP?
The account with the folders I want to watch is Google IMAP. The account to which I want messages copied is 'Local Folders'.
![]() OK, then the filters would work automatically only on messages newly arrived to the account's Inbox. You could set up a Saved Search that seeks messages in that Gmail account, including sub-folders, but the action triggered by such a search would not copy the new messages to separate folders but only to one destination folder under Local Folders, probably not an acceptable solution.
Is it critical that you access that account as an IMAP account? Yes, there is no choice about the IMAP aspect. That's why I'm hoping there's some sort of event API that includes a 'message arrived in folder' event that I can hook.
You can use a folder listener like the Mailbox Alert extension.
https://dxr.mozilla.org/comm-release/so ... stener.idl https://dxr.mozilla.org/comm-release/so ... ession.idl That looks awesomely like what I want. Thanks! I'll check it out!
9 posts
• Page 1 of 1
Return to Extension Development Who is onlineUsers browsing this forum: No registered users and 0 guests |
![]() |