Diffstat (limited to 'kmicromail/libmailwrapper/smtpwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | kmicromail/libmailwrapper/smtpwrapper.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp index 448a2e9..a6c12e4 100644 --- a/kmicromail/libmailwrapper/smtpwrapper.cpp +++ b/kmicromail/libmailwrapper/smtpwrapper.cpp @@ -220,4 +220,5 @@ void SMTPwrapper::connect_server() return; } + //m_smtp->auth = MAILSMTP_AUTH_LOGIN; int err = MAILSMTP_NO_ERROR; @@ -253,11 +254,8 @@ void SMTPwrapper::connect_server() qDebug("Smpt: No TLS possible "); } else { - err = mailesmtp_ehlo(m_smtp); - if ( err != MAILSMTP_NO_ERROR ) - result = 0; - else qDebug("Smpt: Using TLS "); } } + //qDebug("mailesmtp_ehlo %d ",err ); if (!try_tls && force_tls) { @@ -265,4 +263,16 @@ void SMTPwrapper::connect_server() failuretext = i18n("Error init SMTP tls:%1").arg(mailsmtpError(err)); } + if ( mailesmtp_ehlo(m_smtp) != MAILSMTP_NO_ERROR ) { + qDebug("Smpt: ehlo failed "); + result = 0; + } + else { + //qDebug("Smpt: auth is %d -- %d %d",m_smtp->auth, MAILSMTP_AUTH_LOGIN, MAILSMTP_AUTH_PLAIN); + if ( m_smtp->auth & MAILSMTP_AUTH_LOGIN && m_smtp->auth & MAILSMTP_AUTH_PLAIN ) { + qDebug("Smpt: Using MAILSMTP_AUTH_LOGIN "); + m_smtp->auth -= MAILSMTP_AUTH_PLAIN; + //qDebug("Smpt: auth is %d -- %d %d",m_smtp->auth, MAILSMTP_AUTH_LOGIN, MAILSMTP_AUTH_PLAIN); + } + } if (result==1 && m_SmtpAccount->getLogin() ) { |