Diffstat (limited to 'noncore/net/mail/libmailwrapper/storemail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/storemail.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/mail/libmailwrapper/storemail.cpp b/noncore/net/mail/libmailwrapper/storemail.cpp index 052e0f1..595e7fc 100644 --- a/noncore/net/mail/libmailwrapper/storemail.cpp +++ b/noncore/net/mail/libmailwrapper/storemail.cpp | |||
@@ -28,49 +28,49 @@ Storemail::Storemail(const QString&dir,const QString&aFolder) | |||
28 | m_Account = 0; | 28 | m_Account = 0; |
29 | m_tfolder = aFolder; | 29 | m_tfolder = aFolder; |
30 | wrapper = AbstractMail::getWrapper(dir); | 30 | wrapper = AbstractMail::getWrapper(dir); |
31 | if (wrapper) { | 31 | if (wrapper) { |
32 | wrapper->createMbox(m_tfolder); | 32 | wrapper->createMbox(m_tfolder); |
33 | } | 33 | } |
34 | } | 34 | } |
35 | 35 | ||
36 | Storemail::Storemail(const QString&aFolder) | 36 | Storemail::Storemail(const QString&aFolder) |
37 | : Generatemail() | 37 | : Generatemail() |
38 | { | 38 | { |
39 | wrapper = 0; | 39 | wrapper = 0; |
40 | m_Account = 0; | 40 | m_Account = 0; |
41 | m_tfolder = aFolder; | 41 | m_tfolder = aFolder; |
42 | wrapper = AbstractMail::getWrapper(AbstractMail::defaultLocalfolder()); | 42 | wrapper = AbstractMail::getWrapper(AbstractMail::defaultLocalfolder()); |
43 | if (wrapper) { | 43 | if (wrapper) { |
44 | wrapper->createMbox(m_tfolder); | 44 | wrapper->createMbox(m_tfolder); |
45 | } | 45 | } |
46 | } | 46 | } |
47 | 47 | ||
48 | Storemail::~Storemail() | 48 | Storemail::~Storemail() |
49 | { | 49 | { |
50 | } | 50 | } |
51 | 51 | ||
52 | int Storemail::storeMail(const Opie::osmart_pointer<Mail>&mail) | 52 | int Storemail::storeMail(const Opie::OSmartPointer<Mail>&mail) |
53 | { | 53 | { |
54 | if (!wrapper) return 0; | 54 | if (!wrapper) return 0; |
55 | int ret = 1; | 55 | int ret = 1; |
56 | 56 | ||
57 | mailmime * mimeMail = 0; | 57 | mailmime * mimeMail = 0; |
58 | mimeMail = createMimeMail(mail ); | 58 | mimeMail = createMimeMail(mail ); |
59 | if ( mimeMail == NULL ) { | 59 | if ( mimeMail == NULL ) { |
60 | qDebug( "storeMail: error creating mime mail" ); | 60 | qDebug( "storeMail: error creating mime mail" ); |
61 | return 0; | 61 | return 0; |
62 | } | 62 | } |
63 | char *data; | 63 | char *data; |
64 | size_t size; | 64 | size_t size; |
65 | data = 0; | 65 | data = 0; |
66 | 66 | ||
67 | mailmessage * msg = 0; | 67 | mailmessage * msg = 0; |
68 | msg = mime_message_init(mimeMail); | 68 | msg = mime_message_init(mimeMail); |
69 | mime_message_set_tmpdir(msg,getenv( "HOME" )); | 69 | mime_message_set_tmpdir(msg,getenv( "HOME" )); |
70 | int r = mailmessage_fetch(msg,&data,&size); | 70 | int r = mailmessage_fetch(msg,&data,&size); |
71 | mime_message_detach_mime(msg); | 71 | mime_message_detach_mime(msg); |
72 | mailmessage_free(msg); | 72 | mailmessage_free(msg); |
73 | msg = 0; | 73 | msg = 0; |
74 | if (r != MAIL_NO_ERROR || !data) { | 74 | if (r != MAIL_NO_ERROR || !data) { |
75 | qDebug("Error fetching mime..."); | 75 | qDebug("Error fetching mime..."); |
76 | ret = 0; | 76 | ret = 0; |