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) (unidiff)
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*
159 } 159 }
160 if (failuremessage) { 160 if (failuremessage) {
161 QMessageBox::critical(0,i18n("Error sending mail"), 161 QMessageBox::critical(0,i18n("Error sending mail"),
162 i18n("<center>%1</center>").arg(failuremessage)); 162 failuremessage);
163 } 163 }
164} 164}
165 165
@@ -219,39 +219,42 @@ void SMTPwrapper::connect_server()
219 int err = MAILSMTP_NO_ERROR; 219 int err = MAILSMTP_NO_ERROR;
220 ; // odebug << "Servername " << server << " at port " << port << "" << oendl; 220 ; // odebug << "Servername " << server << " at port " << port << "" << oendl;
221 if ( ssl ) { 221 if ( ssl ) {
222 ; // odebug << "SSL session" << oendl; 222 qDebug("smtp: ssl_connect ");
223 err = mailsmtp_ssl_connect( m_smtp, server.latin1(), port ); 223 err = mailsmtp_ssl_connect( m_smtp, server.latin1(), port );
224 } else { 224 } else {
225 ; // odebug << "No SSL session" << oendl; 225 ; // odebug << "No SSL session" << oendl;
226 err = mailsmtp_socket_connect( m_smtp, server.latin1(), port ); 226 err = mailsmtp_socket_connect( m_smtp, server.latin1(), port );
227 } 227 }
228 if ( err != MAILSMTP_NO_ERROR ) { 228 if ( err != MAILSMTP_NO_ERROR ) {
229 ; // odebug << "Error init connection" << oendl; 229 qDebug("Error init SMTP connection" );
230 failuretext = i18n("Error init SMTP connection: %1").arg(mailsmtpError(err)); 230 failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err));
231 result = 0; 231 result = 0;
232 } 232 }
233 233
234 qDebug("SMTP connection inited ");
234 /* switch to tls after init 'cause there it will send the ehlo */ 235 /* switch to tls after init 'cause there it will send the ehlo */
235 if (result) { 236 if (result) {
236 err = mailsmtp_init( m_smtp ); 237 err = mailsmtp_init( m_smtp );
237 if (err != MAILSMTP_NO_ERROR) { 238 if (err != MAILSMTP_NO_ERROR) {
238 result = 0; 239 result = 0;
239 failuretext = i18n("Error init SMTP connection: %1").arg(mailsmtpError(err)); 240 qDebug("Error init SMTP connection ");
241 failuretext = i18n("Error init SMTP connection:\n%1").arg(mailsmtpError(err));
240 } 242 }
241 } 243 }
242
243 if (try_tls) { 244 if (try_tls) {
245 qDebug("Smpt: Try tls ");
244 err = start_smtp_tls(); 246 err = start_smtp_tls();
245 if (err != MAILSMTP_NO_ERROR) { 247 if (err != MAILSMTP_NO_ERROR) {
246 try_tls = false; 248 try_tls = false;
249 qDebug("no tls ");
247 } else { 250 } else {
248 err = mailesmtp_ehlo(m_smtp); 251 err = mailesmtp_ehlo(m_smtp);
249 } 252 }
250 } 253 }
251 254 //qDebug("mailesmtp_ehlo %d ",err );
252 if (!try_tls && force_tls) { 255 if (!try_tls && force_tls) {
253 result = 0; 256 result = 0;
254 failuretext = i18n("Error init SMTP tls: %1").arg(mailsmtpError(err)); 257 failuretext = i18n("Error init SMTP tls:%1").arg(mailsmtpError(err));
255 } 258 }
256 259
257 if (result==1 && m_SmtpAccount->getLogin() ) { 260 if (result==1 && m_SmtpAccount->getLogin() ) {
@@ -267,7 +270,7 @@ void SMTPwrapper::connect_server()
267 pass = login.getPassword(); 270 pass = login.getPassword();
268 } else { 271 } else {
269 result = 0; 272 result = 0;
270 failuretext=i18n("Login aborted - storing mail to localfolder"); 273 failuretext=i18n("Login aborted - \nstoring mail to localfolder");
271 } 274 }
272 } else { 275 } else {
273 user = m_SmtpAccount->getUser(); 276 user = m_SmtpAccount->getUser();
@@ -277,7 +280,7 @@ void SMTPwrapper::connect_server()
277 if (result) { 280 if (result) {
278 err = mailsmtp_auth( m_smtp, (char*)user.latin1(), (char*)pass.latin1() ); 281 err = mailsmtp_auth( m_smtp, (char*)user.latin1(), (char*)pass.latin1() );
279 if ( err == MAILSMTP_NO_ERROR ) { 282 if ( err == MAILSMTP_NO_ERROR ) {
280 ; // odebug << "auth ok" << oendl; 283 qDebug("Smtp authentification ok ");
281 } else { 284 } else {
282 failuretext = i18n("Authentification failed"); 285 failuretext = i18n("Authentification failed");
283 result = 0; 286 result = 0;
@@ -306,7 +309,8 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size )
306 if (m_smtp) { 309 if (m_smtp) {
307 err = mailsmtp_send( m_smtp, from, rcpts, data, size ); 310 err = mailsmtp_send( m_smtp, from, rcpts, data, size );
308 if ( err != MAILSMTP_NO_ERROR ) { 311 if ( err != MAILSMTP_NO_ERROR ) {
309 failuretext=i18n("Error sending mail: %1").arg(mailsmtpError(err)); 312 qDebug("Error sending mail");
313 failuretext=i18n("Error sending mail:\n%1").arg(mailsmtpError(err));
310 result = 0; 314 result = 0;
311 } 315 }
312 } else { 316 } else {