Closed Bug 1654006 Opened 4 years ago Closed 2 years ago

Add an API(s) to get notified when a mail was sent (or sending it failed)

Categories

(Thunderbird :: Add-Ons: Extensions API, enhancement)

enhancement

Tracking

(thunderbird_esr102+ fixed)

RESOLVED FIXED
105 Branch
Tracking Status
thunderbird_esr102 + fixed

People

(Reporter: florian.unger, Assigned: TbSync)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.119 Safari/537.36

Steps to reproduce:

I want to get notified when a mail from the compose window was sent successfully
or if it failed, like it was possible with the legacy API "nsIMsgSendListener"

The API should provide the MessageId of the sent mail enabling to fetch the sent Mail from the Sent-Folder and do further things with it.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Version: 68 → unspecified

I made an experiment API which implements the event "onAfterSend" for the compose window
It notifies when a mail was sent and returns the messageId.

https://github.com/int-red/experiment-api-composeevent

Assignee: nobody → john
Status: NEW → ASSIGNED

Pushed by alessandro@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/a0226743f89a
Add onAfterSend event to compose API. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED

Unfortunately browser_ext_compose_saveDraft.js and browser_ext_compose_saveTemplate.js are failing on macOS debug after this patch landed.

Flags: needinfo?(john)

Found the issue and fix is in the making.

Flags: needinfo?(john)
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/d6cf0a914adf
Only return headerMessageId for sendNow, to comply with the schema. r=darktrojan
Target Milestone: --- → 105 Branch

Comment on attachment 9285737 [details]
Bug 1654006 - Add onAfterSend event to compose API. r=mkmelin

[Approval Request Comment]
Regression caused by (bug #):
User impact if declined:
Testing completed (on c-c, etc.):
On Beta since 21 days.

Risk to taking this patch (and alternatives if risky):
The patch is not small and affects sending messages (core) but it has not caused any (known) reports on beta. I would like to make the feature available in 102 already and not wait till 115.

Attachment #9285737 - Flags: approval-comm-esr102?

Comment on attachment 9285737 [details]
Bug 1654006 - Add onAfterSend event to compose API. r=mkmelin

[Triage Comment]
Approved for esr102

Attachment #9285737 - Flags: approval-comm-esr102? → approval-comm-esr102+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: