author | alwin <alwin> | 2004-01-05 22:21:41 (UTC) |
---|---|---|
committer | alwin <alwin> | 2004-01-05 22:21:41 (UTC) |
commit | c8d0dd53a75b7142a5ce924e4afbea77b86e56b0 (patch) (unidiff) | |
tree | 2845e68c4a3ee0daa7f732a29fefd81d47c90f9d /noncore/net/mail/libmailwrapper | |
parent | 07278dd6ba68e3ff55d22acc76a28956b06d5d9c (diff) | |
download | opie-c8d0dd53a75b7142a5ce924e4afbea77b86e56b0.zip opie-c8d0dd53a75b7142a5ce924e4afbea77b86e56b0.tar.gz opie-c8d0dd53a75b7142a5ce924e4afbea77b86e56b0.tar.bz2 |
bugfix in imapwrapper
storemail for all possible mail-accounts
raw body fetch in all wrappers
unified public interface
dialog for selecting a target mailbox started
Diffstat (limited to 'noncore/net/mail/libmailwrapper') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/abstractmail.h | 1 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 74 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.h | 1 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mboxwrapper.cpp | 13 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/mboxwrapper.h | 3 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.cpp | 11 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/pop3wrapper.h | 3 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 17 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.h | 4 |
9 files changed, 79 insertions, 48 deletions
diff --git a/noncore/net/mail/libmailwrapper/abstractmail.h b/noncore/net/mail/libmailwrapper/abstractmail.h index 7c060db..9770991 100644 --- a/noncore/net/mail/libmailwrapper/abstractmail.h +++ b/noncore/net/mail/libmailwrapper/abstractmail.h | |||
@@ -26,6 +26,7 @@ public: | |||
26 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part)=0; | 26 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part)=0; |
27 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part)=0; | 27 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part)=0; |
28 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part)=0; | 28 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part)=0; |
29 | virtual encodedString* fetchRawBody(const RecMail&mail)=0; | ||
29 | 30 | ||
30 | virtual void deleteMail(const RecMail&mail)=0; | 31 | virtual void deleteMail(const RecMail&mail)=0; |
31 | virtual void answeredMail(const RecMail&mail)=0; | 32 | virtual void answeredMail(const RecMail&mail)=0; |
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 95b317a..d252159 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -466,6 +466,10 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> | |||
466 | mailimap_fetch_type *fetchType; | 466 | mailimap_fetch_type *fetchType; |
467 | mailimap_set *set; | 467 | mailimap_set *set; |
468 | clistcell*current,*cur; | 468 | clistcell*current,*cur; |
469 | mailimap_section_part * section_part = 0; | ||
470 | mailimap_section_spec * section_spec = 0; | ||
471 | mailimap_section * section = 0; | ||
472 | mailimap_fetch_att * fetch_att = 0; | ||
469 | 473 | ||
470 | login(); | 474 | login(); |
471 | if (!m_imap) { | 475 | if (!m_imap) { |
@@ -480,17 +484,24 @@ encodedString*IMAPwrapper::fetchRawPart(const RecMail&mail,const QValueList<int> | |||
480 | } | 484 | } |
481 | } | 485 | } |
482 | set = mailimap_set_new_single(mail.getNumber()); | 486 | set = mailimap_set_new_single(mail.getNumber()); |
483 | clist*id_list=clist_new(); | ||
484 | for (unsigned j=0; j < path.count();++j) { | ||
485 | uint32_t * p_id = (uint32_t *)malloc(sizeof(*p_id)); | ||
486 | *p_id = path[j]; | ||
487 | clist_append(id_list,p_id); | ||
488 | } | ||
489 | mailimap_section_part * section_part = mailimap_section_part_new(id_list); | ||
490 | mailimap_section_spec * section_spec = mailimap_section_spec_new(MAILIMAP_SECTION_SPEC_SECTION_PART, NULL, section_part, NULL); | ||
491 | mailimap_section * section = mailimap_section_new(section_spec); | ||
492 | mailimap_fetch_att * fetch_att = mailimap_fetch_att_new_body_section(section); | ||
493 | 487 | ||
488 | clist*id_list = 0; | ||
489 | |||
490 | /* if path == empty then its a request for the whole rfc822 mail and generates | ||
491 | a "fetch <id> (body[])" statement on imap server */ | ||
492 | if (path.count()>0 ) { | ||
493 | id_list = clist_new(); | ||
494 | for (unsigned j=0; j < path.count();++j) { | ||
495 | uint32_t * p_id = (uint32_t *)malloc(sizeof(*p_id)); | ||
496 | *p_id = path[j]; | ||
497 | clist_append(id_list,p_id); | ||
498 | } | ||
499 | section_part = mailimap_section_part_new(id_list); | ||
500 | section_spec = mailimap_section_spec_new(MAILIMAP_SECTION_SPEC_SECTION_PART, NULL, section_part, NULL); | ||
501 | } | ||
502 | |||
503 | section = mailimap_section_new(section_spec); | ||
504 | fetch_att = mailimap_fetch_att_new_body_section(section); | ||
494 | fetchType = mailimap_fetch_type_new_fetch_att(fetch_att); | 505 | fetchType = mailimap_fetch_type_new_fetch_att(fetch_att); |
495 | 506 | ||
496 | clist*result = 0; | 507 | clist*result = 0; |
@@ -955,24 +966,28 @@ void IMAPwrapper::statusFolder(folderStat&target_stat,const QString & mailbox) | |||
955 | r = mailimap_status_att_list_add(att_list, MAILIMAP_STATUS_ATT_RECENT); | 966 | r = mailimap_status_att_list_add(att_list, MAILIMAP_STATUS_ATT_RECENT); |
956 | r = mailimap_status_att_list_add(att_list, MAILIMAP_STATUS_ATT_UNSEEN); | 967 | r = mailimap_status_att_list_add(att_list, MAILIMAP_STATUS_ATT_UNSEEN); |
957 | r = mailimap_status(m_imap, mailbox.latin1(), att_list, &status); | 968 | r = mailimap_status(m_imap, mailbox.latin1(), att_list, &status); |
958 | for (cur = clist_begin(status->st_info_list); | 969 | if (r==MAILIMAP_NO_ERROR&&status->st_info_list!=0) { |
959 | cur != NULL ; cur = clist_next(cur)) { | 970 | for (cur = clist_begin(status->st_info_list); |
960 | mailimap_status_info * status_info; | 971 | cur != NULL ; cur = clist_next(cur)) { |
961 | status_info = (mailimap_status_info *)clist_content(cur); | 972 | mailimap_status_info * status_info; |
962 | switch (status_info->st_att) { | 973 | status_info = (mailimap_status_info *)clist_content(cur); |
963 | case MAILIMAP_STATUS_ATT_MESSAGES: | 974 | switch (status_info->st_att) { |
964 | target_stat.message_count = status_info->st_value; | 975 | case MAILIMAP_STATUS_ATT_MESSAGES: |
965 | break; | 976 | target_stat.message_count = status_info->st_value; |
966 | case MAILIMAP_STATUS_ATT_RECENT: | 977 | break; |
967 | target_stat.message_recent = status_info->st_value; | 978 | case MAILIMAP_STATUS_ATT_RECENT: |
968 | break; | 979 | target_stat.message_recent = status_info->st_value; |
969 | case MAILIMAP_STATUS_ATT_UNSEEN: | 980 | break; |
970 | target_stat.message_unseen = status_info->st_value; | 981 | case MAILIMAP_STATUS_ATT_UNSEEN: |
971 | break; | 982 | target_stat.message_unseen = status_info->st_value; |
983 | break; | ||
984 | } | ||
972 | } | 985 | } |
986 | } else { | ||
987 | qDebug("Error retrieving status"); | ||
973 | } | 988 | } |
974 | mailimap_mailbox_data_status_free(status); | 989 | if (status) mailimap_mailbox_data_status_free(status); |
975 | mailimap_status_att_list_free(att_list); | 990 | if (att_list) mailimap_status_att_list_free(att_list); |
976 | } | 991 | } |
977 | 992 | ||
978 | void IMAPwrapper::storeMessage(const char*msg,size_t length, const QString&folder) | 993 | void IMAPwrapper::storeMessage(const char*msg,size_t length, const QString&folder) |
@@ -990,3 +1005,10 @@ const QString&IMAPwrapper::getType()const | |||
990 | { | 1005 | { |
991 | return account->getType(); | 1006 | return account->getType(); |
992 | } | 1007 | } |
1008 | |||
1009 | encodedString* IMAPwrapper::fetchRawBody(const RecMail&mail) | ||
1010 | { | ||
1011 | // dummy | ||
1012 | QValueList<int> path; | ||
1013 | return fetchRawPart(mail,path,false); | ||
1014 | } | ||
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.h b/noncore/net/mail/libmailwrapper/imapwrapper.h index 6a9c411..b246f58 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.h +++ b/noncore/net/mail/libmailwrapper/imapwrapper.h | |||
@@ -36,6 +36,7 @@ public: | |||
36 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part); | 36 | virtual QString fetchTextPart(const RecMail&mail,const RecPart&part); |
37 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part); | 37 | virtual encodedString* fetchDecodedPart(const RecMail&mail,const RecPart&part); |
38 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part); | 38 | virtual encodedString* fetchRawPart(const RecMail&mail,const RecPart&part); |
39 | virtual encodedString* fetchRawBody(const RecMail&mail); | ||
39 | 40 | ||
40 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false); | 41 | virtual int createMbox(const QString&,const Folder*parentfolder=0,const QString& delemiter="/",bool getsubfolder=false); |
41 | virtual int deleteMbox(const Folder*folder); | 42 | virtual int deleteMbox(const Folder*folder); |
diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp index 60f7507..3a0b30a 100644 --- a/noncore/net/mail/libmailwrapper/mboxwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/mboxwrapper.cpp | |||
@@ -172,7 +172,7 @@ void MBOXwrapper::storeMessage(const char*msg,size_t length, const QString&folde | |||
172 | mailmbox_done(f); | 172 | mailmbox_done(f); |
173 | } | 173 | } |
174 | 174 | ||
175 | void MBOXwrapper::fetchRawBody(const RecMail&mail,char**target,size_t*length) | 175 | encodedString* MBOXwrapper::fetchRawBody(const RecMail&mail) |
176 | { | 176 | { |
177 | RecBody body; | 177 | RecBody body; |
178 | mailstorage*storage = mailstorage_new(NULL); | 178 | mailstorage*storage = mailstorage_new(NULL); |
@@ -190,14 +190,14 @@ void MBOXwrapper::fetchRawBody(const RecMail&mail,char**target,size_t*length) | |||
190 | Global::statusMessage(tr("Error initializing mbox")); | 190 | Global::statusMessage(tr("Error initializing mbox")); |
191 | mailfolder_free(folder); | 191 | mailfolder_free(folder); |
192 | mailstorage_free(storage); | 192 | mailstorage_free(storage); |
193 | return; | 193 | return 0; |
194 | } | 194 | } |
195 | r = mailsession_get_message(folder->fld_session, mail.getNumber(), &msg); | 195 | r = mailsession_get_message(folder->fld_session, mail.getNumber(), &msg); |
196 | if (r != MAIL_NO_ERROR) { | 196 | if (r != MAIL_NO_ERROR) { |
197 | Global::statusMessage(tr("Error fetching mail %i").arg(mail.getNumber())); | 197 | Global::statusMessage(tr("Error fetching mail %i").arg(mail.getNumber())); |
198 | mailfolder_free(folder); | 198 | mailfolder_free(folder); |
199 | mailstorage_free(storage); | 199 | mailstorage_free(storage); |
200 | return; | 200 | return 0; |
201 | } | 201 | } |
202 | r = mailmessage_fetch(msg,&data,&size); | 202 | r = mailmessage_fetch(msg,&data,&size); |
203 | if (r != MAIL_NO_ERROR) { | 203 | if (r != MAIL_NO_ERROR) { |
@@ -205,13 +205,14 @@ void MBOXwrapper::fetchRawBody(const RecMail&mail,char**target,size_t*length) | |||
205 | mailfolder_free(folder); | 205 | mailfolder_free(folder); |
206 | mailstorage_free(storage); | 206 | mailstorage_free(storage); |
207 | mailmessage_free(msg); | 207 | mailmessage_free(msg); |
208 | return; | 208 | return 0; |
209 | } | 209 | } |
210 | *target = data; | 210 | encodedString*result = new encodedString(data,size); |
211 | *length = size; | 211 | |
212 | mailfolder_free(folder); | 212 | mailfolder_free(folder); |
213 | mailstorage_free(storage); | 213 | mailstorage_free(storage); |
214 | mailmessage_free(msg); | 214 | mailmessage_free(msg); |
215 | return result; | ||
215 | } | 216 | } |
216 | 217 | ||
217 | void MBOXwrapper::deleteMails(const QString & mailbox,QList<RecMail> &target) | 218 | void MBOXwrapper::deleteMails(const QString & mailbox,QList<RecMail> &target) |
diff --git a/noncore/net/mail/libmailwrapper/mboxwrapper.h b/noncore/net/mail/libmailwrapper/mboxwrapper.h index f97fce2..2794014 100644 --- a/noncore/net/mail/libmailwrapper/mboxwrapper.h +++ b/noncore/net/mail/libmailwrapper/mboxwrapper.h | |||
@@ -6,6 +6,7 @@ | |||
6 | 6 | ||
7 | class RecMail; | 7 | class RecMail; |
8 | class RecBody; | 8 | class RecBody; |
9 | class encodedString; | ||
9 | struct mailmbox_folder; | 10 | struct mailmbox_folder; |
10 | 11 | ||
11 | class MBOXwrapper : public Genericwrapper | 12 | class MBOXwrapper : public Genericwrapper |
@@ -30,7 +31,7 @@ public: | |||
30 | virtual RecBody fetchBody( const RecMail &mail ); | 31 | virtual RecBody fetchBody( const RecMail &mail ); |
31 | static void mbox_progress( size_t current, size_t maximum ); | 32 | static void mbox_progress( size_t current, size_t maximum ); |
32 | 33 | ||
33 | virtual void fetchRawBody(const RecMail&mail,char**target,size_t*length); | 34 | virtual encodedString* fetchRawBody(const RecMail&mail); |
34 | virtual void deleteMails(const QString & mailbox,QList<RecMail> &target); | 35 | virtual void deleteMails(const QString & mailbox,QList<RecMail> &target); |
35 | virtual int deleteAllMail(const Folder*); | 36 | virtual int deleteAllMail(const Folder*); |
36 | virtual const QString&getType()const; | 37 | virtual const QString&getType()const; |
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp index 45408dd..72c145b 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.cpp +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.cpp | |||
@@ -228,12 +228,19 @@ void POP3wrapper::statusFolder(folderStat&target_stat,const QString&) | |||
228 | &target_stat.message_recent,&target_stat.message_unseen); | 228 | &target_stat.message_recent,&target_stat.message_unseen); |
229 | } | 229 | } |
230 | 230 | ||
231 | void POP3wrapper::fetchRawBody(const RecMail&mail,char**target,size_t*length) | 231 | encodedString* POP3wrapper::fetchRawBody(const RecMail&mail) |
232 | { | 232 | { |
233 | char*target=0; | ||
234 | size_t length=0; | ||
235 | encodedString*res = 0; | ||
233 | mailmessage * mailmsg = 0; | 236 | mailmessage * mailmsg = 0; |
234 | int err = mailsession_get_message(m_folder->fld_session, mail.getNumber(), &mailmsg); | 237 | int err = mailsession_get_message(m_folder->fld_session, mail.getNumber(), &mailmsg); |
235 | err = mailmessage_fetch(mailmsg,target,length); | 238 | err = mailmessage_fetch(mailmsg,&target,&length); |
236 | if (mailmsg) mailmessage_free(mailmsg); | 239 | if (mailmsg) mailmessage_free(mailmsg); |
240 | if (target) { | ||
241 | res = new encodedString(target,length); | ||
242 | } | ||
243 | return res; | ||
237 | } | 244 | } |
238 | 245 | ||
239 | const QString&POP3wrapper::getType()const | 246 | const QString&POP3wrapper::getType()const |
diff --git a/noncore/net/mail/libmailwrapper/pop3wrapper.h b/noncore/net/mail/libmailwrapper/pop3wrapper.h index b7e8f27..f0307b6 100644 --- a/noncore/net/mail/libmailwrapper/pop3wrapper.h +++ b/noncore/net/mail/libmailwrapper/pop3wrapper.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include "genericwrapper.h" | 5 | #include "genericwrapper.h" |
6 | #include <qstring.h> | 6 | #include <qstring.h> |
7 | 7 | ||
8 | class encodedString; | ||
8 | struct mailstorage; | 9 | struct mailstorage; |
9 | struct mailfolder; | 10 | struct mailfolder; |
10 | 11 | ||
@@ -26,7 +27,7 @@ public: | |||
26 | virtual int deleteAllMail(const Folder*); | 27 | virtual int deleteAllMail(const Folder*); |
27 | 28 | ||
28 | virtual RecBody fetchBody( const RecMail &mail ); | 29 | virtual RecBody fetchBody( const RecMail &mail ); |
29 | virtual void fetchRawBody(const RecMail&mail,char**target,size_t*length); | 30 | virtual encodedString* fetchRawBody(const RecMail&mail); |
30 | virtual void logout(); | 31 | virtual void logout(); |
31 | virtual const QString&getType()const; | 32 | virtual const QString&getType()const; |
32 | static void pop3_progress( size_t current, size_t maximum ); | 33 | static void pop3_progress( size_t current, size_t maximum ); |
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index e054365..00181ff 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp | |||
@@ -485,7 +485,7 @@ 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(const char*mail, size_t length, const QString&box) |
489 | { | 489 | { |
490 | if (!mail) return; | 490 | if (!mail) return; |
491 | QString localfolders = AbstractMail::defaultLocalfolder(); | 491 | QString localfolders = AbstractMail::defaultLocalfolder(); |
@@ -536,7 +536,7 @@ void SMTPwrapper::smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ) | |||
536 | if (rcpts) smtp_address_list_free( rcpts ); | 536 | if (rcpts) smtp_address_list_free( rcpts ); |
537 | } | 537 | } |
538 | 538 | ||
539 | int SMTPwrapper::smtpSend(char*from,clist*rcpts,char*data,size_t size, SMTPaccount *smtp ) | 539 | int SMTPwrapper::smtpSend(char*from,clist*rcpts,const char*data,size_t size, SMTPaccount *smtp ) |
540 | { | 540 | { |
541 | char *server, *user, *pass; | 541 | char *server, *user, *pass; |
542 | bool ssl; | 542 | bool ssl; |
@@ -640,8 +640,6 @@ void SMTPwrapper::sendMail(const Mail&mail,SMTPaccount*aSmtp,bool later ) | |||
640 | 640 | ||
641 | int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which) | 641 | int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which) |
642 | { | 642 | { |
643 | char*data = 0; | ||
644 | size_t length = 0; | ||
645 | size_t curTok = 0; | 643 | size_t curTok = 0; |
646 | mailimf_fields *fields = 0; | 644 | mailimf_fields *fields = 0; |
647 | mailimf_field*ffrom = 0; | 645 | mailimf_field*ffrom = 0; |
@@ -649,11 +647,11 @@ int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which) | |||
649 | char*from = 0; | 647 | char*from = 0; |
650 | int res = 0; | 648 | int res = 0; |
651 | 649 | ||
652 | wrap->fetchRawBody(*which,&data,&length); | 650 | encodedString * data = wrap->fetchRawBody(*which); |
653 | if (!data) return 0; | 651 | if (!data) return 0; |
654 | int err = mailimf_fields_parse( data, length, &curTok, &fields ); | 652 | int err = mailimf_fields_parse( data->Content(), data->Length(), &curTok, &fields ); |
655 | if (err != MAILIMF_NO_ERROR) { | 653 | if (err != MAILIMF_NO_ERROR) { |
656 | free(data); | 654 | delete data; |
657 | delete wrap; | 655 | delete wrap; |
658 | return 0; | 656 | return 0; |
659 | } | 657 | } |
@@ -662,16 +660,15 @@ int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which) | |||
662 | ffrom = getField(fields, MAILIMF_FIELD_FROM ); | 660 | ffrom = getField(fields, MAILIMF_FIELD_FROM ); |
663 | from = getFrom(ffrom); | 661 | from = getFrom(ffrom); |
664 | 662 | ||
665 | qDebug("Size: %i vs. %i",length,strlen(data)); | ||
666 | if (rcpts && from) { | 663 | if (rcpts && from) { |
667 | res = smtpSend(from,rcpts,data,length,smtp ); | 664 | res = smtpSend(from,rcpts,data->Content(),data->Length(),smtp ); |
668 | } | 665 | } |
669 | if (fields) { | 666 | if (fields) { |
670 | mailimf_fields_free(fields); | 667 | mailimf_fields_free(fields); |
671 | fields = 0; | 668 | fields = 0; |
672 | } | 669 | } |
673 | if (data) { | 670 | if (data) { |
674 | free(data); | 671 | delete data; |
675 | } | 672 | } |
676 | if (from) { | 673 | if (from) { |
677 | free(from); | 674 | free(from); |
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.h b/noncore/net/mail/libmailwrapper/smtpwrapper.h index 4a4352f..04fc4b0 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.h +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.h | |||
@@ -47,14 +47,14 @@ protected: | |||
47 | void smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ); | 47 | void smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ); |
48 | clist *createRcptList( mailimf_fields *fields ); | 48 | clist *createRcptList( mailimf_fields *fields ); |
49 | 49 | ||
50 | static void storeMail(char*mail, size_t length, const QString&box); | 50 | static void storeMail(const char*mail, size_t length, const QString&box); |
51 | static QString mailsmtpError( int err ); | 51 | static QString mailsmtpError( int err ); |
52 | static void progress( size_t current, size_t maximum ); | 52 | static void progress( size_t current, size_t maximum ); |
53 | static void addRcpts( clist *list, mailimf_address_list *addr_list ); | 53 | static void addRcpts( clist *list, mailimf_address_list *addr_list ); |
54 | static char *getFrom( mailmime *mail ); | 54 | static char *getFrom( mailmime *mail ); |
55 | static char *getFrom( mailimf_field *ffrom); | 55 | static char *getFrom( mailimf_field *ffrom); |
56 | static mailimf_field *getField( mailimf_fields *fields, int type ); | 56 | static mailimf_field *getField( mailimf_fields *fields, int type ); |
57 | int smtpSend(char*from,clist*rcpts,char*data,size_t size, SMTPaccount *smtp ); | 57 | int smtpSend(char*from,clist*rcpts,const char*data,size_t size, SMTPaccount *smtp ); |
58 | 58 | ||
59 | void storeMail(mailmime*mail, const QString&box); | 59 | void storeMail(mailmime*mail, const QString&box); |
60 | Settings *settings; | 60 | Settings *settings; |