Error in QxtSmtp when 220 reply code is multiline

Issue #59 new
Jonathan Gonzalez created an issue

When connecting to an SMTP server, the initial 220 reply code, can contain multiple lines. The QxtSmtp Library doesn't handle this. Reference: http://tools.ietf.org/html/rfc821 APPENDIX E "...multiline replies are allowed for any command..." "The format for multiline replies requires that every line, except the last, begin with the reply code, followed immediately by a hyphen, "-" (also known as minus), followed by text. The last line will begin with the reply code, followed immediately by <SP>, optionally some text, and <CRLF>."

After trying the library I could send mails through gmail, but not my ISP mail server(which i don't control). After some debugging realized the multiple 220 initial reply: 220-myIsp.org ESMTP Exim 4.82 #2 Tue, 17 Dec 2013 19:44:24 -0500 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.

The problem is that QxtSmtp doesn't accept this, and even worse, it doesn't generate any "failed connection" signal, so the process just stays frozen, because, QxtSmtpPrivate::parseEhlo calls socket->disconnectFromHost();, but never emits any signal.

Comments (1)

  1. Log in to comment