Error message "An error occurred while sending mail..." should provide more context which message failed to send (e.g. when sending is done by filters)
Categories
(Thunderbird :: Message Compose Window, defect)
Tracking
(thunderbird_esr78 wontfix)
| Tracking | Status | |
|---|---|---|
| thunderbird_esr78 | --- | wontfix |
People
(Reporter: clochrua, Assigned: rnons)
Details
(Keywords: leave-open)
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.198 Safari/537.36
Steps to reproduce:
First start-up of the day of TB
TB will have polled my IMAP folders and downloaded new mail and forwarded according to my filters.
Actual results:
The attached error message was displayed but I have no way of knowing which message caused the problem. The message is VERY iuninformative.
The error message only occurs VERY infrequently but I have seen it a couple of times before.
To whoever picks up this error, please advise what logs etc are required, note I always have the filter log running
Comment 1•5 years ago
•
|
||
The error comes from the mail server. Thunderbird only displays what the mail server sends to Thunderbird. Thunderbird cannot invent additional information if the mail server does not provide additional information. There is nothing that can be done in Thunderbird itself to change the error message, as it comes from the mail server. Feel free to tell the mail server to provide more information.
(As the message talks about sending mail you may want to check your outbox.)
Updated•5 years ago
|
Comment 2•5 years ago
|
||
I think this was closed prematurely.
The error message is generated by Thunderbird using the error information from the mail server.
When the error occurs, Thunderbird certainly knows which message it has been sending.
So it's possible for Thunderbird to include that information, which would be very helpful.
From a quick glance at the code (pretty nested), I think this is where the send errors get handled:
https://searchfox.org/comm-central/rev/e3363365eed24f91277ac9946d8e61d357d8547d/mailnews/compose/src/MessageSend.jsm#427-436
So that code has an url parameter, "the delivered message uri", which should be enough to identify the sent message.
/**
* Handle the exit code of message delivery.
* @param {nsIURI} url - The delivered message uri.
* @param {boolean} isNewsDelivery - The message was delivered to newsgroup.
* @param {nsreault} exitCode - The exit code of message delivery.
*/
_deliveryExitProcessing(url, isNewsDelivery, exitCode) {
if (!Components.isSuccessCode(exitCode)) {
let isNSSError = false;
let errorName = MsgUtils.getErrorStringName(exitCode);
Starting point:
errorSendingMessage=An error occurred while sending mail. The mail server responded: %s. Please check the message and try again.
Updated•5 years ago
|
Agreed Thomas, yes I need to talk to my provider - I have three!! So where do I start? And what question do I ask?
Thanks for reopening Thomas, saves me pushing back - I'm on beta 85 to try to help perfect an already very good TB, and sometimes that's a real pain as you can probably imagine!!
As usual, keep up the great work!
Bill
Comment 4•5 years ago
|
||
(In reply to clochrua from comment #3)
Agreed Thomas, yes I need to talk to my provider - I have three!! So where do I start? And what question do I ask?
Well, without even knowing your offending message, it will be difficult to talk to any provider.
And I'm not sure if the onus is on the provider here. They can expect the mail client to know the message for which the error is returned, so including a reference to the message could be considered redundant information. For this particular error message, maybe they could include the start of the offending overlong line - looks like special-casing, not easy, and arguably private information which may not be wanted in error messages.
So I think this might be better fixed on the Thunderbird side: Thunderbird starts a process of sending a known message, and that process returns an error. So afasics we definitely know the message which fails when the error comes in, and it's just a matter of getting that info into the error message which we generate. Things are a bit nested here, so it may not be trivial for us either, also to get the subject from just knowing maybe the message URL. I have seen code which tries to display the sending SMTP server in error messages, which is similar.
Thanks for reopening Thomas, saves me pushing back - I'm on beta 85 to try to help perfect an already very good TB
Thank you so much Bill for doing that!
and sometimes that's a real pain as you can probably imagine!!
Oh yes, I can imagine!
As usual, keep up the great work!
Thank you! :-)
Please shout if you need help trying to reproduce or test a cure - not sure how I can do that but anything in 85 onwards can be tried here - just don't ask me to go to an earlier version!! ;-)
Comment 6•5 years ago
|
||
(In reply to clochrua from comment #3)
Agreed Thomas, yes I need to talk to my provider - I have three!! So where do I start? And what question do I ask?
Thanks for reopening Thomas, saves me pushing back - I'm on beta 85 to try to help perfect an already very good TB, and sometimes that's a real pain as you can probably imagine!!
As usual, keep up the great work!
Bill
Thunderbird version 85 is not the beta and receives daily updates.
Name Thunderbird
Version 85.0a1
Build ID 20201118094249
Update Channel nightly
The beta is currently 84.0b1 and does not receive daily updates.
Name Thunderbird
Version 84.0b1
Build ID 20201117015603
Update Channel beta
| Assignee | ||
Comment 7•5 years ago
|
||
This will help debugging a few sending failures.
Updated•5 years ago
|
Comment 8•5 years ago
•
|
||
That's awesome, Ping, thank you for picking this up!
Have you seen my comment 2? I tried to follow the stack backwards on searchfox starting from our error string and came out in _deliveryExitProcessing(url, isNewsDelivery, exitCode). That url claims to be the "delivered message uri", which seems what we want here.
I'm not 100% sure though.
(In reply to Thomas D. (:thomas8) from comment #2)
From a quick glance at the code (pretty nested), I think this is where the send errors get handled:
https://searchfox.org/comm-central/rev/e3363365eed24f91277ac9946d8e61d357d8547d/mailnews/compose/src/MessageSend.jsm#427-436
So that code has anurlparameter, "the delivered message uri", which should be enough to identify the sent message./** * Handle the exit code of message delivery. * @param {nsIURI} url - The delivered message uri. * @param {boolean} isNewsDelivery - The message was delivered to newsgroup. * @param {nsreault} exitCode - The exit code of message delivery. */ _deliveryExitProcessing(url, isNewsDelivery, exitCode) { if (!Components.isSuccessCode(exitCode)) { let isNSSError = false; let errorName = MsgUtils.getErrorStringName(exitCode);Starting point:
errorSendingMessage=An error occurred while sending mail. The mail server responded: %s. Please check the message and try again.
Comment 9•5 years ago
|
||
(In reply to WaltS48 [:walts48] from comment #6)
(In reply to clochrua from comment #3)
Thanks for reopening Thomas, saves me pushing back - I'm on beta 85 to try to help perfect an already very good TB, and sometimes that's a real pain as you can probably imagine!!
As usual, keep up the great work!
Thunderbird version 85 is not the beta and receives daily updates.
Good point, Walt, thanks!
Indeed, TB 85 is currently "Thunderbird Daily", which is our nightly release channel receiving daily updates (every night I guess)... :-))
Bill, for a slightly less painful experience, consider testing beta instead - more stability, less bugs ;-)
The beta is currently 84.0b1 and does not receive daily updates.
Name Thunderbird
Version 84.0b1
Build ID 20201117015603
Update Channel beta
More details on versions and how they shift around (TB follows FF): https://wiki.mozilla.org/RapidRelease/Calendar
| Assignee | ||
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/808b73442fab
Show original message URI in sending error (in console) if available. r=mkmelin
Updated•5 years ago
|
| Assignee | ||
Comment 11•5 years ago
|
||
Thomas, your understanding is correct. But to fix the problem, we need to find the original msg being forwarded, not the failed sending msg.
Hi :clochrua, next time you see the error, please do the following
- Open Devtools (Ctrl+Shift+i), in the Console tab, you should see a message like
Sending failed: ... originalMsgURI=name@domain/123 - Use the
originalMsgURIto find the original mail. Go to the Inbox folder, useCtrl+uto view the source of a mail. Compare the window title with theoriginalMsgURI. Sorry I'm not aware of any quicker ways to find a mail by message uri. - If you manage to find the mail, try forwarding it manually to see if you get the same error
- If you can reproduce it, save the mail as eml file. Open the eml file with a text editor, remove sensitive information from it. Open the edited eml file with TB, try forwarding again. If still get the same error, please upload the eml file so I can investigate.
Thanks in advance.
| Reporter | ||
Comment 12•5 years ago
|
||
Sorry but this is going to be tricky!
Alert was displayed twice this morning. Opened the Error Console (because it displays a timestamp)
There were two error messages in the error console - Error was something like "onStopSending" - sorry I'm vague because TB dumped and I lost the console log. Did not have time for screen shot or anything and no URI displayed in the error message
Would anything be logged in the dumps? - the dump ID nearest my efforts was bp-bfc467fb-3bd0-4098-8c73-862730201123
I'm pretty sure that in the part of the log I looked at there was no "Sending failed: ..." message with a URI.
Just a thought - having a timestamp on the error message would help trace the problem, and is there a way to save the console/error log on a per-session basis, ie to be saved in the case of a dump?
And I'll take screen shots next time, before looking too far from the error messages.
Sorry can't be more helpful
Bill
| Assignee | ||
Comment 13•5 years ago
|
||
You can ignore the onStopSending error. When right click the error console logs, there is a Export Visible Message To > File menu.
| Assignee | ||
Comment 14•4 years ago
|
||
Bill told me he found a workaround. Please reopen of file new bug if something new is found, thanks.
Updated•4 years ago
|
Description
•