Diffstat (limited to 'noncore/net/mail/libmailwrapper/smtpwrapper.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/libmailwrapper/smtpwrapper.cpp | 33 |
1 files changed, 23 insertions, 10 deletions
diff --git a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp index a7e4837..21992b4 100644 --- a/noncore/net/mail/libmailwrapper/smtpwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/smtpwrapper.cpp | |||
@@ -443,3 +443,5 @@ char *SMTPwrapper::getFrom( mailmime *mail ) | |||
443 | { | 443 | { |
444 | /* no need to delete - its just a pointer to structure content */ | ||
444 | mailimf_field *ffrom = 0; | 445 | mailimf_field *ffrom = 0; |
446 | char*f = 0; | ||
445 | ffrom = getField( mail->mm_data.mm_message.mm_fields, MAILIMF_FIELD_FROM ); | 447 | ffrom = getField( mail->mm_data.mm_message.mm_fields, MAILIMF_FIELD_FROM ); |
@@ -565,2 +567,5 @@ void SMTPwrapper::smtpSend( mailmime *mail,bool later, SMTPaccount *smtp ) | |||
565 | smtpSend(from,rcpts,data,size,smtp); | 567 | smtpSend(from,rcpts,data,size,smtp); |
568 | if (data) {free(data);} | ||
569 | if (from) {free(from);} | ||
570 | if (rcpts) smtp_address_list_free( rcpts ); | ||
566 | } | 571 | } |
@@ -632,6 +637,3 @@ free_mem_session: | |||
632 | free_mem: | 637 | free_mem: |
633 | if (rcpts) smtp_address_list_free( rcpts ); | ||
634 | if (data) free( data ); | ||
635 | if (server) free( server ); | 638 | if (server) free( server ); |
636 | if (from) free( from ); | ||
637 | if ( smtp->getLogin() ) { | 639 | if ( smtp->getLogin() ) { |
@@ -654,3 +656,2 @@ void SMTPwrapper::sendMail(const Mail&mail,bool later ) | |||
654 | sendProgress = new progressMailSend(); | 656 | sendProgress = new progressMailSend(); |
655 | // sendProgress->showMaximized(); | ||
656 | sendProgress->show(); | 657 | sendProgress->show(); |
@@ -675,2 +676,3 @@ int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which) | |||
675 | char*from = 0; | 676 | char*from = 0; |
677 | int res = 0; | ||
676 | 678 | ||
@@ -691,5 +693,18 @@ int SMTPwrapper::sendQueuedMail(MBOXwrapper*wrap,SMTPaccount*smtp,RecMail*which) | |||
691 | if (rcpts && from) { | 693 | if (rcpts && from) { |
692 | return smtpSend(from,rcpts,data,strlen(data),smtp ); | 694 | res = smtpSend(from,rcpts,data,length,smtp ); |
693 | } | 695 | } |
694 | return 0; | 696 | if (fields) { |
697 | mailimf_fields_free(fields); | ||
698 | fields = 0; | ||
699 | } | ||
700 | if (data) { | ||
701 | free(data); | ||
702 | } | ||
703 | if (from) { | ||
704 | free(from); | ||
705 | } | ||
706 | if (rcpts) { | ||
707 | smtp_address_list_free( rcpts ); | ||
708 | } | ||
709 | return res; | ||
695 | } | 710 | } |
@@ -719,5 +734,4 @@ bool SMTPwrapper::flushOutbox(SMTPaccount*smtp) | |||
719 | sendProgress = new progressMailSend(); | 734 | sendProgress = new progressMailSend(); |
720 | // sendProgress->showMaximized(); | 735 | sendProgress->show(); |
721 | sendProgress->show(); | 736 | sendProgress->setMaxMails(mailsToSend.count()); |
722 | sendProgress->setMaxMails(mailsToSend.count()); | ||
723 | 737 | ||
@@ -742,3 +756,2 @@ bool SMTPwrapper::flushOutbox(SMTPaccount*smtp) | |||
742 | return returnValue; | 756 | return returnValue; |
743 | |||
744 | } | 757 | } |