Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.cpp | 7 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.h | 2 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 6 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.h | 1 |
4 files changed, 13 insertions, 3 deletions
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 | |||
@@ -89,6 +89,13 @@ QString AbstractMail::gen_attachment_id() | |||
89 | } | 89 | } |
90 | 90 | ||
91 | int AbstractMail::createMbox(const QString&,const Folder*,const QString& delemiter,bool) | 91 | int AbstractMail::createMbox(const QString&,const Folder*,const QString& delemiter,bool) |
92 | { | 92 | { |
93 | return 0; | 93 | return 0; |
94 | } | 94 | } |
95 | |||
96 | QString 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 | |||
@@ -42,12 +42,14 @@ public: | |||
42 | 42 | ||
43 | static AbstractMail* getWrapper(IMAPaccount *a); | 43 | static AbstractMail* getWrapper(IMAPaccount *a); |
44 | static AbstractMail* getWrapper(POP3account *a); | 44 | static AbstractMail* getWrapper(POP3account *a); |
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 | |||
48 | protected: | 50 | protected: |
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); |
51 | static QString gen_attachment_id(); | 53 | static QString gen_attachment_id(); |
52 | }; | 54 | }; |
53 | #endif | 55 | #endif |
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 | |||
@@ -17,13 +17,13 @@ | |||
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" | 23 | const char* SMTPwrapper::USER_AGENT="OpieMail v0.3"; |
24 | 24 | ||
25 | progressMailSend*SMTPwrapper::sendProgress = 0; | 25 | progressMailSend*SMTPwrapper::sendProgress = 0; |
26 | 26 | ||
27 | SMTPwrapper::SMTPwrapper( Settings *s ) | 27 | SMTPwrapper::SMTPwrapper( Settings *s ) |
28 | : QObject() | 28 | : QObject() |
29 | { | 29 | { |
@@ -485,13 +485,13 @@ void SMTPwrapper::progress( size_t current, size_t maximum ) | |||
485 | } | 485 | } |
486 | } | 486 | } |
487 | 487 | ||
488 | void SMTPwrapper::storeMail(char*mail, size_t length, const QString&box) | 488 | void 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 | ||
497 | void SMTPwrapper::smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ) | 497 | void SMTPwrapper::smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ) |
@@ -686,13 +686,13 @@ int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which) | |||
686 | bool SMTPwrapper::flushOutbox(SMTPaccount*smtp) | 686 | bool 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; |
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 | |||
@@ -59,12 +59,13 @@ protected: | |||
59 | void storeMail(mailmime*mail, const QString&box); | 59 | void storeMail(mailmime*mail, const QString&box); |
60 | Settings *settings; | 60 | Settings *settings; |
61 | 61 | ||
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 | ||
66 | protected slots: | 67 | protected slots: |
67 | void emitQCop( int queued ); | 68 | void emitQCop( int queued ); |
68 | 69 | ||
69 | }; | 70 | }; |
70 | 71 | ||