Error in QxtSmtp when 220 reply code is multiline
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.
I have a pull request which probably can solve your problem http://dev.libqxt.org/libqxt/pull-request/42/smtp-reposnse-parser-rewritten-as-separate