Closed Bug 1710066 Opened 4 years ago Closed 4 years ago

smtp "server responded:" error message do not propagate to the ui

Categories

(MailNews Core :: Networking: SMTP, defect)

defect

Tracking

(thunderbird_esr78 unaffected, thunderbird89 affected)

RESOLVED FIXED
90 Branch
Tracking Status
thunderbird_esr78 --- unaffected
thunderbird89 --- affected

People

(Reporter: mkmelin, Assigned: rnons)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

Tried to send to my postfix server on localhost, with connection security set to None.

console.debug: mailnews.send: "Creating message file"
console.debug: mailnews.send: "Message file created"
console.debug: mailnews.send: "Delivering mail message"
console.debug: mailnews.smtp: "Sending message <3680ab93-f91a-1e39-d069-ab6db6961f2e@localhost>"
console.debug: mailnews.send: "notifyListenerOnStartSending"
console.debug: mailnews.smtp: "S: 220 magnus-y720.home ESMTP Postfix (Ubuntu)\r\n"
console.debug: mailnews.smtp: "C: EHLO [127.0.0.1]"
console.debug: mailnews.smtp: "S: 250-magnus-y720.home\r\n250-PIPELINING\r\n250-SIZE 10240000\r\n250-VRFY\r\n250-ETRN\r\n250-STARTTLS\r\n250-ENHANCEDSTATUSCODES\r\n250-8BITMIME\r\n250-DSN\r\n250-SMTPUTF8\r\n250 CHUNKING\r\n"
console.debug: mailnews.smtp: "Possible auth methods: "
console.debug: mailnews.smtp: "Maximum allowd message size: 10240000"
console.debug: mailnews.smtp: "C: MAIL FROM:<guest@localhost> BODY=8BITMIME SMTPUTF8 SIZE=408 RET=FULL ENVID=<3680ab93-f91a-1e39-d069-ab6db6961f2e@localhost>"
console.debug: mailnews.smtp: "S: 530 5.7.0 Must issue a STARTTLS command first\r\n"
console.error: mailnews.smtp: "Command failed: 530 Must issue a STARTTLS command first; currentAction=_actionMAIL"
console.debug: mailnews.send: "OnStopRunningUrl; exitCode=2153066722"
console.debug: mailnews.send: "Delivery exit processing; exitCode=2153066722"
console.error: mailnews.send: "Sending failed; \nThe message could not be sent using Outgoing server (SMTP) smtp.localhost for an unknown reason. Please verify that your Outgoing server (SMTP) settings are correct and try again., exitCode=2153066722, originalMsgURI="

I get an alert:

Sending of the message failed.

The message could not be sent using Outgoing server (SMTP) smtp.localhost for an unknown reason. Please verify that your Outgoing server (SMTP) settings are correct and try again.

If I use the cpp SMTP it fails as well but the message is shown in the alert:

An error occurred while sending mail. The mail server responded:
5.7.0 Must issue a STARTTLS command first.
Please ensure that you are using the correct identity to send and that the used authentication method is correct. Verify that you are allowed to send via this SMTP server with your current credentials from your current network.


Also, if we end up like this and there are no auth methods available, it seems the flow goes at least somewhat wrong (though it would still fail if correct)

I don't have a good solution. nsSmtpProtocol.cpp shows the error dialog directly, and returns NS_ERROR_BUT_DONT_SHOW_ALERT to nsMsgSend.cpp. I think there are two options:

  1. show error dialog directly from SmtpClient.jsm
  2. add an extra errorMessage argument to OnStopRunningUrl

Option 2 is probably better.
nsExplainErrorDetails sure does some whacky things...

See Also: → 1710224
Assignee: nobody → remotenonsense
Status: NEW → ASSIGNED
Target Milestone: --- → 90 Branch

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/847118c4fff3
Propagate smtp server error message to the sending error prompt. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Blocks: 1713724
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: