From bb2e7b131e9a67a30e3412ee23a6ddded6239375 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 24 Jun 2011 18:51:22 -0400 Subject: [PATCH] SMTP: Handle 235 code after initial AUTH command. The server may accept the initial response in our AUTH command and return a 235 (success) code without a 334 (continue) code, such as for example with XOAUTH. Handle this correctly. --- camel/providers/smtp/camel-smtp-transport.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/camel/providers/smtp/camel-smtp-transport.c b/camel/providers/smtp/camel-smtp-transport.c index 40c95e9..5c7c95d 100644 --- a/camel/providers/smtp/camel-smtp-transport.c +++ b/camel/providers/smtp/camel-smtp-transport.c @@ -1210,6 +1210,10 @@ smtp_auth (CamelSmtpTransport *transport, goto lose; } + /* the server may have accepted our initial response */ + if (strncmp (respbuf, "235", 3) == 0) + break; + /* the server challenge/response should follow a 334 code */ if (strncmp (respbuf, "334", 3) != 0) { smtp_set_error ( -- 2.7.4