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
|
||||
$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)
|
||||
|
Loading…
Reference in New Issue
Block a user