Open Bug 511079 (sendinbackground) Opened 11 years ago Updated 4 months ago

Leverage Offline capabilities to make sending email appear faster (aka Send in Background, preference mailnews.sendInBackground) [meta]

Categories

(MailNews Core :: Backend, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: standard8, Unassigned)

References

(Depends on 11 open bugs, Blocks 6 open bugs, )

Details

(Keywords: helpwanted, meta, Whiteboard: [gs])

User Story

Postbox has this enabled, probably for years - a shame we don't.
https://support.postbox-inc.com/hc/en-us/articles/202200330-Send-in-Background 

user requests:
https://support.mozilla.org/en-US/questions/1286288
https://support.mozilla.org/en-US/questions/1194608
https://support.mozilla.org/en-US/questions/1132511
https://support.mozilla.org/en-US/questions/1023292
https://support.mozilla.org/en-US/questions/1180441
https://support.mozilla.org/en-US/questions/1160641
https://support.mozilla.org/en-US/questions/991897
https://launchpad.net/bugs/810769
https://superuser.com/questions/777982/hide-sending-message-dialog-in-thunderbird

blog posts:
https://superuser.com/questions/871132/bad-side-of-enabling-sending-emails-in-the-background
http://www.adriano.ws/how-to-send-email-in-the-background-with-thunderbird
https://support.hollandcomputers.com/kb/a104/why-does-email-i-send-seem-to-take-a-long-time-to-leave-my-outbox.aspx
https://commons.lbl.gov/display/google/Thunderbird+configuration+for+Gmail
https://www.summet.com/blog/2015/11/16/making-thunderbird-send-messages-in-the-background-like-outlook/comment-page-1/
http://durofy.com/thunderbird-background-outlook/

Attachments

(1 file, 1 obsolete file)

+++ This bug was initially created as a clone of Bug #440794 +++

Sending email should use the offline capabilities (dump the mail in Unsent Folders, schedule a background send), so that the user can move on immediately to the next task.


Bug 440794 has done most of the initial work to get basic support, what is left is to be able to manage failures so that send/copy failures are automatically retried, and only notified to the user after several failures, plus the associated UI updates.
Blocks: TB2SM
Summary: Leverage Offline capabilities to make sending email appear faster → Leverage Offline capabilities to make sending email appear faster (aka Send in Background)
Depends on: 440794
Depends on: 512920
Summary: Leverage Offline capabilities to make sending email appear faster (aka Send in Background) → Leverage Offline capabilities to make sending email appear faster (aka Send in Background, preference mailnews.sendInBackground)
Depends on: 532982
Depends on: 518528
Depends on: 537404
Seems to have stopped working in:
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.2pre) Gecko/20100310 Lanikai/3.1b2pre ID:20100310032818
The message gets placed in the outbox, but never actually sent.

This is just an FYI since I know you are not actively developing this feature at this time.
I'm running Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 and seeing the same phenomenon as Joe Sabash in comment 1.  In my case it's emails;  I cannot swear they would never get sent, since when I have found some I have always sent them - which works every time.

I don't see a setting "Send in Background, preference mailnews.sendInBackground"

Peter
Peter, your issue has nothing to do with this functionality unless you find mailnews.sendInBackground=true in about:config (use options|advanced|etc or ask for help a forum). 

And even then, this is only a placeholder tracking bug. You'd want to file a new bug. But first see my posting in .support.thunderbird
Keywords: meta
Summary: Leverage Offline capabilities to make sending email appear faster (aka Send in Background, preference mailnews.sendInBackground) → Leverage Offline capabilities to make sending email appear faster (aka Send in Background, preference mailnews.sendInBackground) [meta]
I have just test mailnews.sendInBackground=true in Lanikai and it works quite ok, but I think that the Activity Manager should display the progress bar, in order to keep a place where the progress statue is available.
Any update on when we'll get this feature?
Depends on: 459376
Depends on: 636681
Depends on: 549274
Assignee: mbanner → nobody
Depends on: 671673
One simple fix to the most basic issue (send in background w/ only the compose window open) is to not do a send in background if there are no other windows open, at least on Windows/Linux, because we know that's going to fail, and we don't want the user to think the app has shutdown when it hasn't (and do something like shut their laptop in the middle of the send).
This fixes the easiest to reproduce issue, which is having only a compose window open and doing a send. I know you're not crazy about leaving the compose window open, but it's a safe simple fix for things like handling mailto links, and will get us that much closer to turning this on.
Assignee: nobody → dbienvenu
Attachment #551136 - Flags: review?(mbanner)
Duplicate of this bug: 673369
Depends on: 677590
Alias: sendinbackground
Depends on: 690194
Do we have a bug on file for switching, UX-wise, to notification bars instead of modal popups that shout in your face? :) (That would be a nice subtask for the gsoc project proposal.)
(In reply to Jonathan Protzenko [:protz] from comment #11)
> Do we have a bug on file for switching, UX-wise, to notification bars
> instead of modal popups that shout in your face? :) (That would be a nice
> subtask for the gsoc project proposal.)

Bug 255233 - Please make dialogs such as "Do you want to send unsent messages?" modeless instead of modal
Bug 564751 - Annoying alert messages coming on top of every others applications

and (some duping needed here)...
Bug 288896 - eliminate modal dialog window, move to activity manager entry, to avoid frequent interruptions by popup saying "Cannot move messages to folder <name> because another operation is in progress" [pop3]
Bug 271589 - password dialog popup accumulate if they are not cancel at once 
Bug 724598 - Enhance failure mode on POP3 accounts

and the big monster
Bug 476696 - Activity Manager: Poptarts
standard8, what about the pending review?
Comment on attachment 551136 [details] [diff] [review]
don't close compose window w/ send in background if last open window

pinging for review - this won't affect the mac, and it makes send in background a lot safer to turn on with the other platforms.
Comment on attachment 551136 [details] [diff] [review]
don't close compose window w/ send in background if last open window

Review of attachment 551136 [details] [diff] [review]:
-----------------------------------------------------------------

::: mail/components/compose/content/MsgComposeCommands.js
@@ +2232,5 @@
>                .getBoolPref("mailnews.sendInBackground");
> +  if (sendInBackground && !Application.platformIsMac) {
> +    let windowMediator =
> +      Components.classes["@mozilla.org/appshell/window-mediator;1"]
> +          .getService(Components.interfaces.nsIWindowMediator);

You can just use Services.wm
Depends on: 745456
Duplicate of this bug: 685056
As this bug, despite originally being about improving background sending (important) has become a dumping ground for cleaning up some very annoying problems with the basic UI throwing endless barrages of modal dialogs at users in an attempt to ensure they are as unproductive as possible.  

All of the modal dialogs mentioned in comment #12 need to be quashed.  A Mulberry-like activity window is more than sufficient for notifications that the user can't do anything about anyway (for example any connection failure of any sort - if your mail isn't coming or going, glance at the activity monitor to find out why).  A non-modal poptart window for user intervention (e.g. enter password) seems acceptable, just throw it to the background and make it modeless.

The sort of duplicate 685056 started with:

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0.1) Gecko/20100101 Firefox/6.0.1
Build ID: 20110830092941

Steps to reproduce:

- Queue outgoing messages
- Start a new message
- Get to a good composition flow where thoughts are gelling and words are coming easily.
- Background send attempt times out on SMTP error [happens to me all the time, I'm often connective via VSAT or Really **** Connections]
- Dialog box "Send Message Error  Sending of message failed. The message could not be sent because the connection to SMTP server mail.myserver.com timed out.  Try again or contact your network administrator. OK" steals focus
- Lose train of thought
- Smash keyboard
- While ordering replacement keyboard off ebay, wonder why a dialog box that is merely informing the user of something completely irrelevant insisted on interrupting the user's work flow.


Actual results:

A pointless dialog box stole focus from my composition window, and interrupted my train of thought.


Expected results:

No dialog box should EVER steal focus from my work.  There is no point in displaying "for your information only, there's nothing you can do, OK?" dialogs in any way that demands attention, and any such warning should come with a "never show me this annoying warning again" option.
Depends on: 749654
Blocks: 799533
No longer depends on: 799533
Comment on attachment 551136 [details] [diff] [review]
don't close compose window w/ send in background if last open window

I'm sorry that I've taken so long to look at this. I was, like previously mentioned concerned that this is an incomplete patch. However, now I've spent a bit of time on it, I think that even if we have bug 459376 fixed (or something that would effectively fix it) then we'd still want to ensure message send completes on sending with just the compose window open anyway.

So I think this is good to go. I'll do a patch that uses Services.wm as Magnus suggested.
Attachment #551136 - Flags: review?(mbanner) → review+
Attachment #551136 - Attachment is obsolete: true
Attachment #677386 - Attachment description: don't close compose window w/ send in background if last open window → don't close compose window w/ send in background if last open window v2
Comment on attachment 677386 [details] [diff] [review]
[checked in] don't close compose window w/ send in background if last open window v2

https://hg.mozilla.org/comm-central/rev/2c2b7ad3bed3
Attachment #677386 - Attachment description: don't close compose window w/ send in background if last open window v2 → [checked in] don't close compose window w/ send in background if last open window v2
I believe David isn't actively working on this at the moment, so removing the assignee. If folks want to help that would be great - the main priorities would be to fix the bugs this one depends on to reduce the dataloss / messages not sent possibilities that there are now.
Assignee: mozilla → nobody
Keywords: helpwanted
Depends on: 815638
Blocks: 971333
Whiteboard: [gs] → [gs][http://kb.mozillazine.org/Thunderbird_3.0_-_New_Features_and_Changes#Send_in_Background]
Whiteboard: [gs][http://kb.mozillazine.org/Thunderbird_3.0_-_New_Features_and_Changes#Send_in_Background] → [gs]
Duplicate of this bug: 246865
Blocks: 246865
Removing myslef on all the bugs I'm cced on. Please NI me if you need something on MailNews Core bugs from me.
See Also: → 297793
list which may contain some related bugs https://mzl.la/24SIlJ8
No longer blocks: 136871
See Also: → 136871
Depends on: 268589
Outlook does this (so I hear). And postbox.  And ... we don't.
Blocks: 423488
User Story: (updated)
Blocks: 1501890
No longer blocks: 971333
Depends on: 971333
Depends on: 1539028
Priority: P1 → P3
User Story: (updated)
You need to log in before you can comment on or make changes to this bug.