Fix problem with forwarding inline images attached to messages with no HTML part (#7414)

release-1.4
Aleksander Machniak 4 years ago
parent f8761d3225
commit 6cc933ef52

@ -5,6 +5,7 @@ CHANGELOG Roundcube Webmail
- Increase maximum size of contact jobtitle and department fields to 128 characters
- Fix missing newline after the logged line when writing to stdout (#7418)
- Elastic: Fix context menu (paste) on the recipient input (#7431)
- Fix problem with forwarding inline images attached to messages with no HTML part (#7414)
RELEASE 1.4.6
-------------

@ -953,6 +953,8 @@ function rcmail_write_compose_attachments(&$message, $bodyIsHtml, &$message_body
$loaded_attachments[$attachment['name'] . $attachment['mimetype']] = $attachment;
}
$has_html = $message->has_html_part();
foreach ((array) $message->mime_parts() as $pid => $part) {
if ($part->mimetype == 'message/rfc822') {
$messages[] = $part->mime_id;
@ -990,7 +992,8 @@ function rcmail_write_compose_attachments(&$message, $bodyIsHtml, &$message_body
// Skip inline images when not used in the body
// Note: Apple Mail sends PDF files marked as inline (#7382)
if ($part->disposition == 'inline' && $part->mimetype != 'application/pdf') {
// Note: Apple clients send inline images even if there's no HTML body (#7414)
if ($has_html && $part->disposition == 'inline' && $part->mimetype != 'application/pdf') {
if (!$bodyIsHtml) {
continue;
}

Loading…
Cancel
Save