summaryrefslogtreecommitdiffabout
path: root/kmicromail/libmailwrapper
authorzautrix <zautrix>2005-02-28 14:46:07 (UTC)
committer zautrix <zautrix>2005-02-28 14:46:07 (UTC)
commitb1f912cbb6a9daf050e94d337de0e0e73417284a (patch) (side-by-side diff)
tree09220df0ef11ccc32c4eafcc2a63b64056068036 /kmicromail/libmailwrapper
parentff810f8f74f6928e664bf52f8e8d128edb8ac5ad (diff)
downloadkdepimpi-b1f912cbb6a9daf050e94d337de0e0e73417284a.zip
kdepimpi-b1f912cbb6a9daf050e94d337de0e0e73417284a.tar.gz
kdepimpi-b1f912cbb6a9daf050e94d337de0e0e73417284a.tar.bz2
ompi refresh outgoing fix
Diffstat (limited to 'kmicromail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/libmailwrapper/smtpwrapper.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/kmicromail/libmailwrapper/smtpwrapper.cpp b/kmicromail/libmailwrapper/smtpwrapper.cpp
index f54fe2b..24f4786 100644
--- a/kmicromail/libmailwrapper/smtpwrapper.cpp
+++ b/kmicromail/libmailwrapper/smtpwrapper.cpp
@@ -159,7 +159,7 @@ void SMTPwrapper::storeFailedMail(const char*data,unsigned int size, const char*
}
if (failuremessage) {
QMessageBox::critical(0,i18n("Error sending mail"),
- i18n("<center>%1</center>").arg(failuremessage));
+ failuremessage);
}
}
@@ -219,39 +219,42 @@ void SMTPwrapper::connect_server()
int err = MAILSMTP_NO_ERROR;
; // odebug << "Servername " << server << " at port " << port << "" << oendl;
if ( ssl ) {
- ; // odebug << "SSL session" << oendl;
+ qDebug("smtp: ssl_connect ");
err = mailsmtp_ssl_connect( m_smtp, server.latin1(), port );
} else {
; // odebug << "No SSL session" << oendl;
err = mailsmtp_socket_connect( m_smtp, server.latin1(), port );
}
if ( err != MAILSMTP_NO_ERROR ) {
- ; // odebug << "Error init connection" << oendl;
- failuretext = i18n("Error init SMTP connection: %1").arg(mailsmtpError(err));
+ qDebug("Error init SMTP connection" );
+ failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err));
result = 0;
}
+ qDebug("SMTP connection inited ");
/* switch to tls after init 'cause there it will send the ehlo */
if (result) {
err = mailsmtp_init( m_smtp );
if (err != MAILSMTP_NO_ERROR) {
result = 0;
- failuretext = i18n("Error init SMTP connection: %1").arg(mailsmtpError(err));
+ qDebug("Error init SMTP connection ");
+ failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err));
}
}
-
if (try_tls) {
+ qDebug("Smpt: Try tls ");
err = start_smtp_tls();
if (err != MAILSMTP_NO_ERROR) {
try_tls = false;
+ qDebug("no tls ");
} else {
err = mailesmtp_ehlo(m_smtp);
}
}
-
+ //qDebug("mailesmtp_ehlo %d ",err );
if (!try_tls && force_tls) {
result = 0;
- failuretext = i18n("Error init SMTP tls: %1").arg(mailsmtpError(err));
+ failuretext = i18n("Error init SMTP tls:%1").arg(mailsmtpError(err));
}
if (result==1 && m_SmtpAccount->getLogin() ) {
@@ -267,7 +270,7 @@ void SMTPwrapper::connect_server()
pass = login.getPassword();
} else {
result = 0;
- failuretext=i18n("Login aborted - storing mail to localfolder");
+ failuretext=i18n("Login aborted - \nstoring mail to localfolder");
}
} else {
user = m_SmtpAccount->getUser();
@@ -277,7 +280,7 @@ void SMTPwrapper::connect_server()
if (result) {
err = mailsmtp_auth( m_smtp, (char*)user.latin1(), (char*)pass.latin1() );
if ( err == MAILSMTP_NO_ERROR ) {
- ; // odebug << "auth ok" << oendl;
+ qDebug("Smtp authentification ok ");
} else {
failuretext = i18n("Authentification failed");
result = 0;
@@ -306,7 +309,8 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size )
if (m_smtp) {
err = mailsmtp_send( m_smtp, from, rcpts, data, size );
if ( err != MAILSMTP_NO_ERROR ) {
- failuretext=i18n("Error sending mail: %1").arg(mailsmtpError(err));
+ qDebug("Error sending mail");
+ failuretext=i18n("Error sending mail:\n%1").arg(mailsmtpError(err));
result = 0;
}
} else {