From ac7199beacd33a2620d58caa5f8da781d4252271 Mon Sep 17 00:00:00 2001 From: Klaus Leithoff Date: Mon, 22 Oct 2007 08:49:17 +0000 Subject: [PATCH] fixed a bug/problem introduced by patch r24492 (doubling of the mailheader) if you are forwarding a mail, with headers already present --- felamimail/inc/class.bocompose.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/felamimail/inc/class.bocompose.inc.php b/felamimail/inc/class.bocompose.inc.php index e52dfd4225..18da4bca47 100644 --- a/felamimail/inc/class.bocompose.inc.php +++ b/felamimail/inc/class.bocompose.inc.php @@ -708,16 +708,16 @@ if(!empty($attachment['uid']) && !empty($attachment['folder'])) { switch($attachment['type']) { case 'MESSAGE/RFC822': + $rawHeader=''; $bofelamimail->openConnection(); $bofelamimail->reopen($attachment['folder']); - $rawHeader = $bofelamimail->getMessageRawHeader($attachment['uid'], $attachment['partID']); - $rawBody = $bofelamimail->getMessageRawBody($attachment['uid'], $attachment['partID']); + 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']);