mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-03-03 13:29:24 +01:00
Fix ticket mails with application/pdf but no content disposition
This commit is contained in:
parent
94043a6609
commit
834588c347
@ -74,6 +74,11 @@ class MailAttachmentData implements MailAttachmentInterface
|
|||||||
if ($content_type == 'application/octet-stream') {
|
if ($content_type == 'application/octet-stream') {
|
||||||
return('application/octet-stream');
|
return('application/octet-stream');
|
||||||
}
|
}
|
||||||
|
// Check for application/pdf
|
||||||
|
$content_type = $part->getContentType();
|
||||||
|
if ($content_type == 'application/pdf') {
|
||||||
|
return('application/pdf');
|
||||||
|
}
|
||||||
// Check for Content-id
|
// Check for Content-id
|
||||||
$contentIdHeader = $part->getHeader('content-id');
|
$contentIdHeader = $part->getHeader('content-id');
|
||||||
if ($contentIdHeader !== null) {
|
if ($contentIdHeader !== null) {
|
||||||
|
@ -558,13 +558,7 @@ class TicketImportHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($plainTextBody == '' && $htmlBody == '') {
|
if ($plainTextBody == '' && $htmlBody == '') {
|
||||||
$simple_content = $message->getContent();
|
$this->logger->debug('Empty mail',[]);
|
||||||
if (empty($simple_content)) {
|
|
||||||
$this->logger->debug('Empty mail',[]);
|
|
||||||
} else {
|
|
||||||
$plainTextBody = $simple_content;
|
|
||||||
$htmlBody = nl2br(htmlentities($simple_content));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->logger->debug('Text',['plain' => $plainTextBody, 'html' => $htmlBody, 'simple_content' => $simple_content]);
|
$this->logger->debug('Text',['plain' => $plainTextBody, 'html' => $htmlBody, 'simple_content' => $simple_content]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user