Diffstat (limited to 'noncore/net/mail/libmailwrapper/smtpwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index 86673aa..e2cea7a 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp | |||
@@ -4,24 +4,25 @@ | |||
4 | #include "logindialog.h" | 4 | #include "logindialog.h" |
5 | #include "mailtypes.h" | 5 | #include "mailtypes.h" |
6 | #include "sendmailprogress.h" | 6 | #include "sendmailprogress.h" |
7 | 7 | ||
8 | #include <qt.h> | 8 | #include <qt.h> |
9 | 9 | ||
10 | #include <qpe/config.h> | 10 | #include <qpe/config.h> |
11 | #include <qpe/qcopenvelope_qws.h> | 11 | #include <qpe/qcopenvelope_qws.h> |
12 | 12 | ||
13 | #include <libetpan/libetpan.h> | 13 | #include <libetpan/libetpan.h> |
14 | 14 | ||
15 | 15 | ||
16 | using namespace Opie::Core; | ||
16 | progressMailSend*SMTPwrapper::sendProgress = 0; | 17 | progressMailSend*SMTPwrapper::sendProgress = 0; |
17 | 18 | ||
18 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) | 19 | SMTPwrapper::SMTPwrapper(SMTPaccount * aSmtp ) |
19 | : Generatemail() | 20 | : Generatemail() |
20 | { | 21 | { |
21 | m_SmtpAccount = aSmtp; | 22 | m_SmtpAccount = aSmtp; |
22 | Config cfg( "mail" ); | 23 | Config cfg( "mail" ); |
23 | cfg.setGroup( "Status" ); | 24 | cfg.setGroup( "Status" ); |
24 | m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); | 25 | m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); |
25 | emit queuedMails( m_queuedMail ); | 26 | emit queuedMails( m_queuedMail ); |
26 | connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) ); | 27 | connect( this, SIGNAL( queuedMails(int) ), this, SLOT( emitQCop(int) ) ); |
27 | m_smtp = 0; | 28 | m_smtp = 0; |
@@ -303,25 +304,25 @@ int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size ) | |||
303 | result = 0; | 304 | result = 0; |
304 | } | 305 | } |
305 | 306 | ||
306 | if (!result) { | 307 | if (!result) { |
307 | storeFailedMail(data,size,failuretext); | 308 | storeFailedMail(data,size,failuretext); |
308 | } else { | 309 | } else { |
309 | qDebug( "Mail sent." ); | 310 | qDebug( "Mail sent." ); |
310 | storeMail(data,size,"Sent"); | 311 | storeMail(data,size,"Sent"); |
311 | } | 312 | } |
312 | return result; | 313 | return result; |
313 | } | 314 | } |
314 | 315 | ||
315 | void SMTPwrapper::sendMail(const Opie::OSmartPointer<Mail>&mail,bool later ) | 316 | void SMTPwrapper::sendMail(const Opie::Core::OSmartPointer<Mail>&mail,bool later ) |
316 | { | 317 | { |
317 | mailmime * mimeMail; | 318 | mailmime * mimeMail; |
318 | 319 | ||
319 | mimeMail = createMimeMail(mail ); | 320 | mimeMail = createMimeMail(mail ); |
320 | if ( mimeMail == NULL ) { | 321 | if ( mimeMail == NULL ) { |
321 | qDebug( "sendMail: error creating mime mail" ); | 322 | qDebug( "sendMail: error creating mime mail" ); |
322 | } else { | 323 | } else { |
323 | sendProgress = new progressMailSend(); | 324 | sendProgress = new progressMailSend(); |
324 | sendProgress->show(); | 325 | sendProgress->show(); |
325 | sendProgress->setMaxMails(1); | 326 | sendProgress->setMaxMails(1); |
326 | smtpSend( mimeMail,later); | 327 | smtpSend( mimeMail,later); |
327 | qDebug("Clean up done"); | 328 | qDebug("Clean up done"); |