bug 534158 if smtp server doesn't advertise auth mechanisms, try to send mail directly, r=benb, sr=neil
This commit is contained in:
Родитель
11a37babd4
Коммит
7298d8ec24
|
@ -1001,20 +1001,14 @@ PRInt32 nsSmtpProtocol::ProcessAuth()
|
|||
|
||||
(void) ChooseAuthMethod(); // advance m_currentAuthMethod
|
||||
|
||||
if (m_prefAuthMethods == SMTP_AUTH_NONE_ENABLED) // No auth needed
|
||||
// We don't need to auth, per pref, or the server doesn't advertise AUTH,
|
||||
// so skip auth and try to send message.
|
||||
if (m_prefAuthMethods == SMTP_AUTH_NONE_ENABLED || !TestFlag(SMTP_AUTH))
|
||||
{
|
||||
m_nextState = SMTP_SEND_HELO_RESPONSE;
|
||||
// fake to 250 because SendHeloResponse() tests for this
|
||||
m_responseCode = 250;
|
||||
}
|
||||
// did the server advertise authentication capability at all,
|
||||
// but we wanted to auth?
|
||||
else if (!TestFlag(SMTP_AUTH))
|
||||
{
|
||||
m_urlErrorState = NS_ERROR_SMTP_AUTH_NOT_SUPPORTED;
|
||||
m_nextState = SMTP_ERROR_DONE;
|
||||
return NS_ERROR_SMTP_AUTH_FAILURE;
|
||||
}
|
||||
else if (m_currentAuthMethod == SMTP_AUTH_EXTERNAL_ENABLED)
|
||||
{
|
||||
buffer = "AUTH EXTERNAL =";
|
||||
|
|
Загрузка…
Ссылка в новой задаче