summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/accountview.cpp5
-rw-r--r--noncore/net/mail/libmailwrapper/abstractmail.cpp7
-rw-r--r--noncore/net/mail/libmailwrapper/abstractmail.h2
-rw-r--r--noncore/net/mail/libmailwrapper/smtpwrapper.cpp6
-rw-r--r--noncore/net/mail/libmailwrapper/smtpwrapper.h1
5 files changed, 15 insertions, 6 deletions
diff --git a/noncore/net/mail/accountview.cpp b/noncore/net/mail/accountview.cpp
index 2ce89db..77fa706 100644
--- a/noncore/net/mail/accountview.cpp
+++ b/noncore/net/mail/accountview.cpp
@@ -1,6 +1,6 @@
1#include <stdlib.h>
2#include "accountview.h" 1#include "accountview.h"
3#include <libmailwrapper/mailtypes.h> 2#include <libmailwrapper/mailtypes.h>
3#include <libmailwrapper/abstractmail.h>
4#include "defines.h" 4#include "defines.h"
5#include "newmaildir.h" 5#include "newmaildir.h"
6#include <qmessagebox.h> 6#include <qmessagebox.h>
@@ -446,8 +446,7 @@ void AccountView::populate( QList<Account> list )
446{ 446{
447 clear(); 447 clear();
448 448
449 QString localfolders = (QString) getenv( "HOME" ) + QString("/Applications/opiemail/localmail/"); 449 (void) new MBOXviewItem(AbstractMail::defaultLocalfolder(),this);
450 (void) new MBOXviewItem(localfolders,this);
451 450
452 Account *it; 451 Account *it;
453 for ( it = list.first(); it; it = list.next() ) { 452 for ( it = list.first(); it; it = list.next() ) {
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.cpp b/noncore/net/mail/libmailwrapper/abstractmail.cpp
index f303d72..80d0b52 100644
--- a/noncore/net/mail/libmailwrapper/abstractmail.cpp
+++ b/noncore/net/mail/libmailwrapper/abstractmail.cpp
@@ -92,3 +92,10 @@ int AbstractMail::createMbox(const QString&,const Folder*,const QString& delemit
92{ 92{
93 return 0; 93 return 0;
94} 94}
95
96QString AbstractMail::defaultLocalfolder()
97{
98 QString f = getenv( "HOME" );
99 f += "/Applications/opiemail/localmail";
100 return f;
101}
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.h b/noncore/net/mail/libmailwrapper/abstractmail.h
index dab9e10..ca9caed 100644
--- a/noncore/net/mail/libmailwrapper/abstractmail.h
+++ b/noncore/net/mail/libmailwrapper/abstractmail.h
@@ -45,6 +45,8 @@ public:
45 /* mbox only! */ 45 /* mbox only! */
46 static AbstractMail* getWrapper(const QString&a); 46 static AbstractMail* getWrapper(const QString&a);
47 47
48 static QString defaultLocalfolder();
49
48protected: 50protected:
49 static encodedString*decode_String(const encodedString*text,const QString&enc); 51 static encodedString*decode_String(const encodedString*text,const QString&enc);
50 static QString convert_String(const char*text); 52 static QString convert_String(const char*text);
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
@@ -20,7 +20,7 @@
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
@@ -488,7 +488,7 @@ void SMTPwrapper::progress( size_t current, size_t maximum )
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;
@@ -689,7 +689,7 @@ bool SMTPwrapper::flushOutbox(SMTPaccount*smtp)
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");
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.h b/noncore/net/mail/libmailwrapper/smtpwrapper.h
index 05becf2..4a4352f 100644
--- a/noncore/net/mail/libmailwrapper/smtpwrapper.h
+++ b/noncore/net/mail/libmailwrapper/smtpwrapper.h
@@ -62,6 +62,7 @@ protected:
62 int sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which); 62 int sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which);
63 63
64 int m_queuedMail; 64 int m_queuedMail;
65 static const char* USER_AGENT;
65 66
66protected slots: 67protected slots:
67 void emitQCop( int queued ); 68 void emitQCop( int queued );