From 789e13a4ced97587a002055d6bb744b847d0c412 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Thu, 8 May 2008 10:32:50 +0000 Subject: [PATCH] commit of Patch to correct bug #1283 only 1st attachment is good when sent from draft provided by Dominique HORVATH --- felamimail/inc/class.bocompose.inc.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/felamimail/inc/class.bocompose.inc.php b/felamimail/inc/class.bocompose.inc.php index 18da4bca47..692ba6d5c4 100644 --- a/felamimail/inc/class.bocompose.inc.php +++ b/felamimail/inc/class.bocompose.inc.php @@ -704,25 +704,22 @@ # } // add the attachments + $bofelamimail->openConnection(); foreach((array)$this->sessionData['attachments'] as $attachment) { if(!empty($attachment['uid']) && !empty($attachment['folder'])) { switch($attachment['type']) { case 'MESSAGE/RFC822': $rawHeader=''; - $bofelamimail->openConnection(); $bofelamimail->reopen($attachment['folder']); if (isset($attachment['partID'])) { $rawHeader = $bofelamimail->getMessageRawHeader($attachment['uid'], $attachment['partID']); } $rawBody = $bofelamimail->getMessageRawBody($attachment['uid'], $attachment['partID']); - $bofelamimail->closeConnection(); $_mailObject->AddStringAttachment($rawHeader.$rawBody, $attachment['name'], '7bit', 'message/rfc822'); break; default: - $bofelamimail->openConnection(); $bofelamimail->reopen($attachment['folder']); $attachmentData = $bofelamimail->getAttachment($attachment['uid'], $attachment['partID']); - $bofelamimail->closeConnection(); $_mailObject->AddStringAttachment($attachmentData['attachment'], $attachment['name'], 'base64', $attachment['type']); @@ -738,6 +735,7 @@ ); } } + $bofelamimail->closeConnection(); } function saveAsDraft($_formData)