Enigma: Fix incorrect encrypted mail structure (boundary) with Mail_Mime >= 1.10.5

pull/7203/head
Aleksander Machniak 5 years ago
parent 4114dc932d
commit 3478b002f8

@ -242,8 +242,6 @@ class enigma_mime_message extends Mail_mime
} }
$this->headers = array_merge($this->headers, $headers); $this->headers = array_merge($this->headers, $headers);
return;
} }
else { else {
$output = $message->encode($boundary, $skip_head); $output = $message->encode($boundary, $skip_head);
@ -253,11 +251,18 @@ class enigma_mime_message extends Mail_mime
} }
$this->headers = array_merge($this->headers, $output['headers']); $this->headers = array_merge($this->headers, $output['headers']);
}
return $output['body']; // remember the boundary used, in case we'd handle headers() call later
if (empty($boundary) && !empty($this->headers['Content-Type'])) {
if (preg_match('/boundary="([^"]+)/', $this->headers['Content-Type'], $m)) {
$this->build_params['boundary'] = $m[1];
} }
} }
return $filename ? null : $output['body'];
}
/** /**
* Get Content-Type and Content-Transfer-Encoding headers of the message * Get Content-Type and Content-Transfer-Encoding headers of the message
* *

Loading…
Cancel
Save