After running a lot of test cycles for my addon development, I noticed, that Thunderbirds own function detachAllAttachments() triggers the event because of the saved stripped message copy.
STR:
* Create a simple MX Addon and register the eventListener
```
browser.messages.onNewMailReceived.addListener(() => {
console.debug("onNewMailReceived is fired");
});
```
* Open a message with attachments
* Go to the attachment bar at the bottom, click on Thunderbirds own "Detach" option and confirm to detach/delete the attachments.
Bug 1716051 Comment 2 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
After running a lot of test cycles for my addon development, I noticed, that Thunderbirds own function detachAllAttachments() triggers the event because of the saved stripped message copy in the IMAP folder. I report this, to show, that there is no other copy/move process necessary. I understand, that in this case the new created stripped message is a new message for the IMAP server, but this shouldn't fire the event.
Doing the same in local or POP folders doesn't trigger the event.
STR:
* Create a simple MX Addon and register the eventListener
```
browser.messages.onNewMailReceived.addListener(() => {
console.debug("onNewMailReceived is fired");
});
```
* Open a message with attachments
* Go to the attachment bar at the bottom, click on Thunderbirds own "Detach" option and confirm to detach/delete the attachments.