ticket improved attachment handling when no content-disposition is giving

This commit is contained in:
OpenXE 2024-04-11 16:12:47 +02:00
parent 51a6c07085
commit ba17741470
1 changed files with 9 additions and 2 deletions

View File

@ -67,11 +67,18 @@ class MailAttachmentData implements MailAttachmentInterface
} else if ($split[0] === 'inline') {
return ('inline');
}
} else { // Check for application/octet-stream
} else {
// No disposition given (that is a bad thing)
// Check for application/octet-stream
$content_type = $part->getContentType();
if ($content_type == 'application/octet-stream') {
return('application/octet-stream');
}
}
// Check for Content-id
$contentIdHeader = $part->getHeader('content-id');
if ($contentIdHeader !== null) {
return ('inline');
}
}
}