Diffstat (limited to 'noncore/net/mail/libmailwrapper/smtpwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index e2cea7a..ba78c3b 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp | |||
@@ -115,7 +115,7 @@ void SMTPwrapper::smtpSend( mailmime *mail,bool later) { | |||
115 | if (r != MAIL_NO_ERROR || !data) { | 115 | if (r != MAIL_NO_ERROR || !data) { |
116 | if (data) | 116 | if (data) |
117 | free(data); | 117 | free(data); |
118 | qDebug("Error fetching mime..."); | 118 | odebug << "Error fetching mime..." << oendl; |
119 | return; | 119 | return; |
120 | } | 120 | } |
121 | msg = 0; | 121 | msg = 0; |
@@ -208,16 +208,16 @@ void SMTPwrapper::connect_server() | |||
208 | } | 208 | } |
209 | 209 | ||
210 | int err = MAILSMTP_NO_ERROR; | 210 | int err = MAILSMTP_NO_ERROR; |
211 | qDebug( "Servername %s at port %i", server, port ); | 211 | odebug << "Servername " << server << " at port " << port << "" << oendl; |
212 | if ( ssl ) { | 212 | if ( ssl ) { |
213 | qDebug( "SSL session" ); | 213 | odebug << "SSL session" << oendl; |
214 | err = mailsmtp_ssl_connect( m_smtp, server, port ); | 214 | err = mailsmtp_ssl_connect( m_smtp, server, port ); |
215 | } else { | 215 | } else { |
216 | qDebug( "No SSL session" ); | 216 | odebug << "No SSL session" << oendl; |
217 | err = mailsmtp_socket_connect( m_smtp, server, port ); | 217 | err = mailsmtp_socket_connect( m_smtp, server, port ); |
218 | } | 218 | } |
219 | if ( err != MAILSMTP_NO_ERROR ) { | 219 | if ( err != MAILSMTP_NO_ERROR ) { |
220 | qDebug("Error init connection"); | 220 | odebug << "Error init connection" << oendl; |
221 | failuretext = tr("Error init SMTP connection: %1").arg(mailsmtpError(err)); | 221 | failuretext = tr("Error init SMTP connection: %1").arg(mailsmtpError(err)); |
222 | result = 0; | 222 | result = 0; |
223 | } | 223 | } |
@@ -246,7 +246,7 @@ void SMTPwrapper::connect_server() | |||
246 | } | 246 | } |
247 | 247 | ||
248 | if (result==1 && m_SmtpAccount->getLogin() ) { | 248 | if (result==1 && m_SmtpAccount->getLogin() ) { |
249 | qDebug("smtp with auth"); | 249 | odebug << "smtp with auth" << oendl; |
250 | if ( m_SmtpAccount->getUser().isEmpty() || m_SmtpAccount->getPassword().isEmpty() ) { | 250 | if ( m_SmtpAccount->getUser().isEmpty() || m_SmtpAccount->getPassword().isEmpty() ) { |
251 | // get'em | 251 | // get'em |
252 | LoginDialog login( m_SmtpAccount->getUser(), | 252 | LoginDialog login( m_SmtpAccount->getUser(), |
@@ -264,11 +264,11 @@ void SMTPwrapper::connect_server() | |||
264 | user = m_SmtpAccount->getUser().latin1(); | 264 | user = m_SmtpAccount->getUser().latin1(); |
265 | pass = m_SmtpAccount->getPassword().latin1(); | 265 | pass = m_SmtpAccount->getPassword().latin1(); |
266 | } | 266 | } |
267 | qDebug( "session->auth: %i", m_smtp->auth); | 267 | odebug << "session->auth: " << m_smtp->auth << "" << oendl; |
268 | if (result) { | 268 | if (result) { |
269 | err = mailsmtp_auth( m_smtp, (char*)user, (char*)pass ); | 269 | err = mailsmtp_auth( m_smtp, (char*)user, (char*)pass ); |
270 | if ( err == MAILSMTP_NO_ERROR ) { | 270 | if ( err == MAILSMTP_NO_ERROR ) { |
271 | qDebug("auth ok"); | 271 | odebug << "auth ok" << oendl; |
272 | } else { | 272 | } else { |
273 | failuretext = tr("Authentification failed"); | 273 | failuretext = tr("Authentification failed"); |
274 | result = 0; | 274 | result = 0; |
@@ -307,7 +307,7 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size ) | |||
307 | if (!result) { | 307 | if (!result) { |
308 | storeFailedMail(data,size,failuretext); | 308 | storeFailedMail(data,size,failuretext); |
309 | } else { | 309 | } else { |
310 | qDebug( "Mail sent." ); | 310 | odebug << "Mail sent." << oendl; |
311 | storeMail(data,size,"Sent"); | 311 | storeMail(data,size,"Sent"); |
312 | } | 312 | } |
313 | return result; | 313 | return result; |
@@ -319,13 +319,13 @@ void SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later | |||
319 | 319 | ||
320 | mimeMail = createMimeMail(mail ); | 320 | mimeMail = createMimeMail(mail ); |
321 | if ( mimeMail == NULL ) { | 321 | if ( mimeMail == NULL ) { |
322 | qDebug( "sendMail: error creating mime mail" ); | 322 | odebug << "sendMail: error creating mime mail" << oendl; |
323 | } else { | 323 | } else { |
324 | sendProgress = new progressMailSend(); | 324 | sendProgress = new progressMailSend(); |
325 | sendProgress->show(); | 325 | sendProgress->show(); |
326 | sendProgress->setMaxMails(1); | 326 | sendProgress->setMaxMails(1); |
327 | smtpSend( mimeMail,later); | 327 | smtpSend( mimeMail,later); |
328 | qDebug("Clean up done"); | 328 | odebug << "Clean up done" << oendl; |
329 | sendProgress->hide(); | 329 | sendProgress->hide(); |
330 | delete sendProgress; | 330 | delete sendProgress; |
331 | sendProgress = 0; | 331 | sendProgress = 0; |
@@ -378,9 +378,9 @@ int SMTPwrapper::sendQueuedMail(AbstractMail*wrap,const RecMailP&which) { | |||
378 | bool SMTPwrapper::flushOutbox() { | 378 | bool SMTPwrapper::flushOutbox() { |
379 | bool returnValue = true; | 379 | bool returnValue = true; |
380 | 380 | ||
381 | qDebug("Sending the queue"); | 381 | odebug << "Sending the queue" << oendl; |
382 | if (!m_SmtpAccount) { | 382 | if (!m_SmtpAccount) { |
383 | qDebug("No smtp account given"); | 383 | odebug << "No smtp account given" << oendl; |
384 | return false; | 384 | return false; |
385 | } | 385 | } |
386 | 386 | ||
@@ -388,7 +388,7 @@ bool SMTPwrapper::flushOutbox() { | |||
388 | QString localfolders = AbstractMail::defaultLocalfolder(); | 388 | QString localfolders = AbstractMail::defaultLocalfolder(); |
389 | AbstractMail*wrap = AbstractMail::getWrapper(localfolders); | 389 | AbstractMail*wrap = AbstractMail::getWrapper(localfolders); |
390 | if (!wrap) { | 390 | if (!wrap) { |
391 | qDebug("memory error"); | 391 | odebug << "memory error" << oendl; |
392 | return false; | 392 | return false; |
393 | } | 393 | } |
394 | QString oldPw, oldUser; | 394 | QString oldPw, oldUser; |
@@ -398,7 +398,7 @@ bool SMTPwrapper::flushOutbox() { | |||
398 | wrap->listMessages(mbox,mailsToSend); | 398 | wrap->listMessages(mbox,mailsToSend); |
399 | if (mailsToSend.count()==0) { | 399 | if (mailsToSend.count()==0) { |
400 | delete wrap; | 400 | delete wrap; |
401 | qDebug("No mails to send"); | 401 | odebug << "No mails to send" << oendl; |
402 | return false; | 402 | return false; |
403 | } | 403 | } |
404 | 404 | ||