Pass ComposeDetails to messenger.compose.onAfterSend Listener
Categories
(Thunderbird :: Add-Ons: Extensions API, enhancement)
Tracking
(Not tracked)
People
(Reporter: WoofGrrrr, Assigned: john)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
Steps to reproduce:
In the code for my Web Extension, I tried to get the ComposeDetails in my messenger,compose.onAfterSend listener. The listener is passed a Tab object, and I got the ID from the Tab to call messenger.compose.getComposeDetails(tabId).
Actual results:
getComposeDetails() returned undefined
Expected results:
It should return a ComposeDetails with the information that was used when the message was actually sent.
I posted about this on the Add-on Developers Topicbox and it was suggested that I open a request to instead pass the ComposeDetails directly to the onAfterSend listener.
Yes, I can save the ComposeDetails -- whatever data from it that I need -- when the onBeforeSend is called, but onBeforeSend can be called multiple times before a message is actually sent. And the message may ultimately not even be sent. And saving things for later is sort of a pain when the API could make things easier.
There are fields in ComposeDetails that may be quite useful to an onAfterSend listener.
In my case I want the identityId in order to get the accountId and thus the Account from which the message was sent. This way I can know which SMTP server was used, amongst other things. I can't think of any way to get this other than the ComposeDetails.
| Assignee | ||
Updated•5 days ago
|
| Assignee | ||
Comment 1•5 days ago
|
||
Updated•5 days ago
|
| Assignee | ||
Comment 2•5 days ago
|
||
Thanks for suggesting this feature. We, too, think it is useful.
| Assignee | ||
Updated•16 hours ago
|
Updated•16 hours ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/78a0cbb73026
Pass ComposeDetails to compose.onAfter* listeners. r=mkmelin
Description
•