mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-01 04:13:28 +01:00
commit of Patch to correct bug #1283 only 1st attachment is good when sent from draft
provided by Dominique HORVATH
This commit is contained in:
parent
40e38dd400
commit
789e13a4ce
@ -704,25 +704,22 @@
|
|||||||
# }
|
# }
|
||||||
|
|
||||||
// add the attachments
|
// add the attachments
|
||||||
|
$bofelamimail->openConnection();
|
||||||
foreach((array)$this->sessionData['attachments'] as $attachment) {
|
foreach((array)$this->sessionData['attachments'] as $attachment) {
|
||||||
if(!empty($attachment['uid']) && !empty($attachment['folder'])) {
|
if(!empty($attachment['uid']) && !empty($attachment['folder'])) {
|
||||||
switch($attachment['type']) {
|
switch($attachment['type']) {
|
||||||
case 'MESSAGE/RFC822':
|
case 'MESSAGE/RFC822':
|
||||||
$rawHeader='';
|
$rawHeader='';
|
||||||
$bofelamimail->openConnection();
|
|
||||||
$bofelamimail->reopen($attachment['folder']);
|
$bofelamimail->reopen($attachment['folder']);
|
||||||
if (isset($attachment['partID'])) {
|
if (isset($attachment['partID'])) {
|
||||||
$rawHeader = $bofelamimail->getMessageRawHeader($attachment['uid'], $attachment['partID']);
|
$rawHeader = $bofelamimail->getMessageRawHeader($attachment['uid'], $attachment['partID']);
|
||||||
}
|
}
|
||||||
$rawBody = $bofelamimail->getMessageRawBody($attachment['uid'], $attachment['partID']);
|
$rawBody = $bofelamimail->getMessageRawBody($attachment['uid'], $attachment['partID']);
|
||||||
$bofelamimail->closeConnection();
|
|
||||||
$_mailObject->AddStringAttachment($rawHeader.$rawBody, $attachment['name'], '7bit', 'message/rfc822');
|
$_mailObject->AddStringAttachment($rawHeader.$rawBody, $attachment['name'], '7bit', 'message/rfc822');
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
$bofelamimail->openConnection();
|
|
||||||
$bofelamimail->reopen($attachment['folder']);
|
$bofelamimail->reopen($attachment['folder']);
|
||||||
$attachmentData = $bofelamimail->getAttachment($attachment['uid'], $attachment['partID']);
|
$attachmentData = $bofelamimail->getAttachment($attachment['uid'], $attachment['partID']);
|
||||||
$bofelamimail->closeConnection();
|
|
||||||
|
|
||||||
$_mailObject->AddStringAttachment($attachmentData['attachment'], $attachment['name'], 'base64', $attachment['type']);
|
$_mailObject->AddStringAttachment($attachmentData['attachment'], $attachment['name'], 'base64', $attachment['type']);
|
||||||
|
|
||||||
@ -738,6 +735,7 @@
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$bofelamimail->closeConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveAsDraft($_formData)
|
function saveAsDraft($_formData)
|
||||||
|
Loading…
Reference in New Issue
Block a user