fixed a bug/problem introduced by patch r24492 (doubling of the mailheader) if you are forwarding a mail, with headers already present

This commit is contained in:
Klaus Leithoff 2007-10-22 08:49:17 +00:00
parent ac86714bc5
commit ac7199beac

View File

@ -708,16 +708,16 @@
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']);