Skip to content

Commit

Permalink
Bug 1140884 - "An error occurred while sending mail" error message (a…
Browse files Browse the repository at this point in the history
…nd other error messages?) garbled. r=mkmelin
  • Loading branch information
sshagarwal committed Mar 29, 2015
1 parent 0ecc039 commit 82fd65c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions mailnews/compose/src/nsSmtpProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1548,9 +1548,16 @@ nsresult nsSmtpProtocol::SendRecipientResponse()
else
errorcode = NS_ERROR_SENDING_RCPT_COMMAND;

rv = nsExplainErrorDetails(m_runningURL, errorcode,
m_responseText.get(),
m_addresses[m_addressesLeft - 1].get());
if (errorcode == NS_ERROR_SENDING_RCPT_COMMAND) {
rv = nsExplainErrorDetails(
m_runningURL, errorcode, NS_ConvertUTF8toUTF16(m_responseText).get(),
NS_ConvertUTF8toUTF16(m_addresses[m_addressesLeft - 1]).get());
} else {
rv = nsExplainErrorDetails(m_runningURL, errorcode,
m_responseText.get(),
m_addresses[m_addressesLeft - 1].get());
}

NS_ASSERTION(NS_SUCCEEDED(rv), "failed to explain SMTP error");

m_urlErrorState = NS_ERROR_BUT_DONT_SHOW_ALERT;
Expand Down

0 comments on commit 82fd65c

Please sign in to comment.