Thunderbird/TestPlans/SendInBackground
Feature Name: "Send In Background"
Current Developer: Mark Banner (Standard8)
Relevant Bugs: bug 440794
High Level Description
The idea here is that when a user sends an email, they don't want to have to wait for the email to be sent before getting on with the next task. The intention is to utilise Thunderbird's existing "Send Later" mechanism to send the emails in the background with some added automation.
Note that the existing Send Later mechanism remains intact.
The added advantage of sending in the background, is that if there is an error the code can automatically handle that and proceed with sending other emails and/or wait until a bit later to try again. Obviously if there are persistent failures, then Thunderbird should alert the user.
One area we have to be careful with is shutdown - if Thunderbird is in the process of sending an email, we shouldn't abort that - but allow it to be finished (whilst also informing the user). Additionally, if emails are waiting to be sent, we should potentially alert about those as well.
Current Status
The feature is currently disabled by default due to being incomplete. To enable the feature for testing, go into Preferences -> Advanced -> General -> Config Editor and change mailnews.sendInBackground
to true
and restart Thunderbird.
The following parts are implemented:
- Basic send in background.
- Sending a message will temporarily (for about a second) put it in the Outbox in Local Folders, and then Thunderbird will attempt to send it.
- Activity Manager progress and notifications
- The activity manager will echo progress and notifications of sending messages in the background (or via Send Later).
- Partial shut down support.
- Sending a message and attempting to quit should bring up a dialog which is retained until the message is sent. On Windows and Linux this will only happen if File -> Quit is used not the 'x' on the window.
Not implemented:
- If there is an error, Thunderbird won't attempt to automatically send the message a second time (until another message is sent).
- If there are multiple messages queued, Thunderbird won't attempt to automatically send other messages that are queued.
- Thunderbird won't notify the user if messages are being
Test Steps
(Note: read the current status in conjunction with this section).
When the feature lands, sending of messages should happen pretty much straight away - once the message is copied to disk, the compose window should be automatically closed and then the only updates will be the message send progress.
Shutdowns of Thunderbird should not cause data loss - messages should be completely sent unless the user cancels them, and copied to the sent mail folder.
If shutting down with pending messages, Thunderbird should notify the user.