QtMail icon indicating copy to clipboard operation
QtMail copied to clipboard

Error in QxtSmtp when 220 reply code is multiline

Open JonyGon opened this issue 11 years ago • 0 comments

Hello, I tried QxtSmt library and had problems when sending with my ISP mail server. That's how I found this new library QtMail, but found the exact same problems. I already posted the error in Qxt library, but letting you know as well.

https://bitbucket.org/libqxt/libqxt/issue/59/error-in-qxtsmtp-when-220-reply-code-is

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.

JonyGon avatar Dec 18 '13 17:12 JonyGon