bluetiger9 / SmtpClient-for-Qt

An SMTP Client writen in C++ for Qt. Allows applications to send emails (MIME with text, html, attachments, inline files, etc.) via SMTP. Supports SSL and SMTP authentication.
https://github.com/bluetiger9/SmtpClient-for-Qt/wiki
GNU Lesser General Public License v2.1
449 stars 226 forks source link

TLS with STARTTLS does not get connection #128

Closed ghorwin closed 1 year ago

ghorwin commented 1 year ago

Example code below does not get to ready-connected:

    SmtpClient smtp("mail.gmx.net", 587, SmtpClient::TlsConnection);
    smtp.setName("client.localhost");
    smtp.connectToHost();
    if (!smtp.waitForReadyConnected(3000)) {
        qDebug() << "Not connected";
        return;
    }

Output:

smtpclient: State: ConnectingState
smtpclient: [Socket] State: QAbstractSocket::HostLookupState
smtpclient: [Socket] State: QAbstractSocket::ConnectingState
smtpclient: [Socket] State: QAbstractSocket::ConnectedState
smtpclient: State: ConnectedState
smtpclient: [Socket] IN:  "220 gmx.net (mrgmx005) Nemesis ESMTP Service ready\r\n"
smtpclient: State: _EHLO_State
smtpclient: [Socket] OUT: "EHLO client.localhost"

After sending EHLO nothing happens and I get a timeout.

I've tried with another SMTP server, but also after sending EHLO nothing happens (no further state changes until time out). The happens on Windows 10 and Linux (Ubuntu 22.04).

Any ideas how to debug this?

-Andreas

cheicktra2 commented 1 year ago

hello, how are you doing? I need your services for SMTP to be able to send messages to several people please answer me my very dear friend happy new year 2023

Le lun. 2 janv. 2023 à 08:54, Andreas Nicolai @.***> a écrit :

Example code below does not get to ready-connected:

SmtpClient smtp("mail.gmx.net", 587, SmtpClient::TlsConnection); smtp.setName("client.localhost"); smtp.connectToHost(); if (!smtp.waitForReadyConnected(3000)) { qDebug() << "Not connected"; return; }

Output:

smtpclient: State: ConnectingState smtpclient: [Socket] State: QAbstractSocket::HostLookupState smtpclient: [Socket] State: QAbstractSocket::ConnectingState smtpclient: [Socket] State: QAbstractSocket::ConnectedState smtpclient: State: ConnectedState smtpclient: [Socket] IN: "220 gmx.net (mrgmx005) Nemesis ESMTP Service ready\r\n" smtpclient: State: _EHLO_State smtpclient: [Socket] OUT: "EHLO client.localhost"

After sending EHLO nothing happens and I get a timeout.

I've tried with another SMTP server, but also after sending EHLO nothing happens (no further state changes until time out).

Any ideas how to debug this?

-Andreas

— Reply to this email directly, view it on GitHub https://github.com/bluetiger9/SmtpClient-for-Qt/issues/128, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4N6FZQVKLJG7JYS4HJVQGLWQKJTZANCNFSM6AAAAAATOUHGMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

ghorwin commented 1 year ago

Hmm, seems that GMX does not support STARTTLS anylonger (though still mentioned on webpage), since I cannot get it to work with Tunderbird, either. SslConnection with port 465 works fine with GMX.

cheicktra2 commented 1 year ago

I don't understand this configuration can I have your telegram if possible?

Le lun. 2 janv. 2023 à 09:28, Andreas Nicolai @.***> a écrit :

Hmm, seems that GMX does not support STARTTLS anylonger (though still mentioned on webpage), since I cannot get it to work with Tunderbird, either. SslConnection with port 465 works fine with GMX.

— Reply to this email directly, view it on GitHub https://github.com/bluetiger9/SmtpClient-for-Qt/issues/128#issuecomment-1368774945, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4N6FZVMJ7I5A6GQ6YIX4LDWQKNSZANCNFSM6AAAAAATOUHGMI . You are receiving this because you commented.Message ID: @.***>