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

pull/7458/head
Aleksander Machniak 4 years ago
parent 4ada2c3f13
commit ec2e713ecb

@ -33,6 +33,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
-------------

@ -947,6 +947,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;
@ -984,7 +986,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