author | zautrix <zautrix> | 2005-03-24 11:29:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-03-24 11:29:53 (UTC) |
commit | b9e83e4536ee4fc34b882fb88b8e5fd00bfdf929 (patch) (unidiff) | |
tree | a0a5565360abc8e79d417b2e55f9b179ad615b87 /kmicromail/libmailwrapper | |
parent | 1dff93853802953ed92b24ac18ebf57f39dcbcfe (diff) | |
download | kdepimpi-b9e83e4536ee4fc34b882fb88b8e5fd00bfdf929.zip kdepimpi-b9e83e4536ee4fc34b882fb88b8e5fd00bfdf929.tar.gz kdepimpi-b9e83e4536ee4fc34b882fb88b8e5fd00bfdf929.tar.bz2 |
ompi smtp fix
-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 | |||
@@ -219,6 +219,7 @@ void SMTPwrapper::connect_server() | |||
219 | we can not display any messagebox */ | 219 | we can not display any messagebox */ |
220 | return; | 220 | return; |
221 | } | 221 | } |
222 | //m_smtp->auth = MAILSMTP_AUTH_LOGIN; | ||
222 | 223 | ||
223 | int err = MAILSMTP_NO_ERROR; | 224 | int err = MAILSMTP_NO_ERROR; |
224 | ; // odebug << "Servername " << server << " at port " << port << "" << oendl; | 225 | ; // odebug << "Servername " << server << " at port " << port << "" << oendl; |
@@ -252,18 +253,27 @@ void SMTPwrapper::connect_server() | |||
252 | try_tls = false; | 253 | try_tls = false; |
253 | qDebug("Smpt: No TLS possible "); | 254 | qDebug("Smpt: No TLS possible "); |
254 | } else { | 255 | } else { |
255 | err = mailesmtp_ehlo(m_smtp); | ||
256 | if ( err != MAILSMTP_NO_ERROR ) | ||
257 | result = 0; | ||
258 | else | ||
259 | qDebug("Smpt: Using TLS "); | 256 | qDebug("Smpt: Using TLS "); |
260 | } | 257 | } |
261 | } | 258 | } |
259 | |||
262 | //qDebug("mailesmtp_ehlo %d ",err ); | 260 | //qDebug("mailesmtp_ehlo %d ",err ); |
263 | if (!try_tls && force_tls) { | 261 | if (!try_tls && force_tls) { |
264 | result = 0; | 262 | result = 0; |
265 | failuretext = i18n("Error init SMTP tls:%1").arg(mailsmtpError(err)); | 263 | failuretext = i18n("Error init SMTP tls:%1").arg(mailsmtpError(err)); |
266 | } | 264 | } |
265 | if ( mailesmtp_ehlo(m_smtp) != MAILSMTP_NO_ERROR ) { | ||
266 | qDebug("Smpt: ehlo failed "); | ||
267 | result = 0; | ||
268 | } | ||
269 | else { | ||
270 | //qDebug("Smpt: auth is %d -- %d %d",m_smtp->auth, MAILSMTP_AUTH_LOGIN, MAILSMTP_AUTH_PLAIN); | ||
271 | if ( m_smtp->auth & MAILSMTP_AUTH_LOGIN && m_smtp->auth & MAILSMTP_AUTH_PLAIN ) { | ||
272 | qDebug("Smpt: Using MAILSMTP_AUTH_LOGIN "); | ||
273 | m_smtp->auth -= MAILSMTP_AUTH_PLAIN; | ||
274 | //qDebug("Smpt: auth is %d -- %d %d",m_smtp->auth, MAILSMTP_AUTH_LOGIN, MAILSMTP_AUTH_PLAIN); | ||
275 | } | ||
276 | } | ||
267 | 277 | ||
268 | if (result==1 && m_SmtpAccount->getLogin() ) { | 278 | if (result==1 && m_SmtpAccount->getLogin() ) { |
269 | ; // odebug << "smtp with auth" << oendl; | 279 | ; // odebug << "smtp with auth" << oendl; |