summaryrefslogtreecommitdiff
path: root/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
Unidiff
Diffstat (limited to 'noncore/net/mail/libmailwrapper/smtpwrapper.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/smtpwrapper.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
index b9c4ff2..e054365 100644
--- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp
@@ -11,25 +11,25 @@
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#include "smtpwrapper.h" 15#include "smtpwrapper.h"
16#include "mailwrapper.h" 16#include "mailwrapper.h"
17#include "mboxwrapper.h" 17#include "mboxwrapper.h"
18#include "logindialog.h" 18#include "logindialog.h"
19#include "mailtypes.h" 19#include "mailtypes.h"
20//#include "defines.h" 20//#include "defines.h"
21#include "sendmailprogress.h" 21#include "sendmailprogress.h"
22 22
23#define USER_AGENT "OpieMail v0.1" 23const char* SMTPwrapper::USER_AGENT="OpieMail v0.3";
24 24
25progressMailSend*SMTPwrapper::sendProgress = 0; 25progressMailSend*SMTPwrapper::sendProgress = 0;
26 26
27SMTPwrapper::SMTPwrapper( Settings *s ) 27SMTPwrapper::SMTPwrapper( Settings *s )
28 : QObject() 28 : QObject()
29{ 29{
30 settings = s; 30 settings = s;
31 Config cfg( "mail" ); 31 Config cfg( "mail" );
32 cfg.setGroup( "Status" ); 32 cfg.setGroup( "Status" );
33 m_queuedMail = cfg.readNumEntry( "outgoing", 0 ); 33 m_queuedMail = cfg.readNumEntry( "outgoing", 0 );
34 emit queuedMails( m_queuedMail ); 34 emit queuedMails( m_queuedMail );
35 connect( this, SIGNAL( queuedMails( int ) ), this, SLOT( emitQCop( int ) ) ); 35 connect( this, SIGNAL( queuedMails( int ) ), this, SLOT( emitQCop( int ) ) );
@@ -479,25 +479,25 @@ char *SMTPwrapper::getFrom( mailmime *mail )
479 479
480void SMTPwrapper::progress( size_t current, size_t maximum ) 480void SMTPwrapper::progress( size_t current, size_t maximum )
481{ 481{
482 if (SMTPwrapper::sendProgress) { 482 if (SMTPwrapper::sendProgress) {
483 SMTPwrapper::sendProgress->setSingleMail(current, maximum ); 483 SMTPwrapper::sendProgress->setSingleMail(current, maximum );
484 qApp->processEvents(); 484 qApp->processEvents();
485 } 485 }
486} 486}
487 487
488void SMTPwrapper::storeMail(char*mail, size_t length, const QString&box) 488void SMTPwrapper::storeMail(char*mail, size_t length, const QString&box)
489{ 489{
490 if (!mail) return; 490 if (!mail) return;
491 QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); 491 QString localfolders = AbstractMail::defaultLocalfolder();
492 MBOXwrapper*wrap = new MBOXwrapper(localfolders); 492 MBOXwrapper*wrap = new MBOXwrapper(localfolders);
493 wrap->storeMessage(mail,length,box); 493 wrap->storeMessage(mail,length,box);
494 delete wrap; 494 delete wrap;
495} 495}
496 496
497void SMTPwrapper::smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ) 497void SMTPwrapper::smtpSend( mailmime *mail,bool later, SMTPaccount *smtp )
498{ 498{
499 clist *rcpts = 0; 499 clist *rcpts = 0;
500 char *from, *data; 500 char *from, *data;
501 size_t size; 501 size_t size;
502 502
503 if ( smtp == NULL ) { 503 if ( smtp == NULL ) {
@@ -680,25 +680,25 @@ int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which)
680 smtp_address_list_free( rcpts ); 680 smtp_address_list_free( rcpts );
681 } 681 }
682 return res; 682 return res;
683} 683}
684 684
685/* this is a special fun */ 685/* this is a special fun */
686bool SMTPwrapper::flushOutbox(SMTPaccount*smtp) 686bool SMTPwrapper::flushOutbox(SMTPaccount*smtp)
687{ 687{
688 bool returnValue = true; 688 bool returnValue = true;
689 689
690 if (!smtp) return false; 690 if (!smtp) return false;
691 691
692 QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); 692 QString localfolders = AbstractMail::defaultLocalfolder();
693 MBOXwrapper*wrap = new MBOXwrapper(localfolders); 693 MBOXwrapper*wrap = new MBOXwrapper(localfolders);
694 if (!wrap) { 694 if (!wrap) {
695 qDebug("memory error"); 695 qDebug("memory error");
696 return false; 696 return false;
697 } 697 }
698 QList<RecMail> mailsToSend; 698 QList<RecMail> mailsToSend;
699 QList<RecMail> mailsToRemove; 699 QList<RecMail> mailsToRemove;
700 QString mbox("Outgoing"); 700 QString mbox("Outgoing");
701 wrap->listMessages(mbox,mailsToSend); 701 wrap->listMessages(mbox,mailsToSend);
702 if (mailsToSend.count()==0) { 702 if (mailsToSend.count()==0) {
703 delete wrap; 703 delete wrap;
704 return false; 704 return false;