Diffstat (limited to 'noncore/net/mail/libmailwrapper/smtpwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
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 | |||
@@ -486,5 +486,5 @@ void SMTPwrapper::progress( size_t current, size_t maximum ) | |||
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; |
@@ -537,5 +537,5 @@ void SMTPwrapper::smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ) | |||
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; |
@@ -641,6 +641,4 @@ void SMTPwrapper::sendMail(const Mail&mail,SMTPaccount*aSmtp,bool later ) | |||
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; |
@@ -650,9 +648,9 @@ int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which) | |||
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; |
@@ -663,7 +661,6 @@ int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which) | |||
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) { |
@@ -672,5 +669,5 @@ int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which) | |||
672 | } | 669 | } |
673 | if (data) { | 670 | if (data) { |
674 | free(data); | 671 | delete data; |
675 | } | 672 | } |
676 | if (from) { | 673 | if (from) { |