From 1a37e3a9ad6db0b1b660c635d04c56d86276d50d Mon Sep 17 00:00:00 2001 From: "M. Wacker" Date: Sun, 29 Mar 2020 23:37:53 +0200 Subject: [PATCH] Fix Encoding for attachments, set to base64 --- plugins/inlineImagePlugin.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/inlineImagePlugin.php b/plugins/inlineImagePlugin.php index db4011a..3c5d8d8 100644 --- a/plugins/inlineImagePlugin.php +++ b/plugins/inlineImagePlugin.php @@ -556,11 +556,11 @@ function messageHeaders($mail) { // Borrowed from the add_html_image() method of the PHPlistMailer class if (method_exists($mail,'AddEmbeddedImageString')) { - $mail->AddEmbeddedImageString($imgs[$i]['contents'], $imgs[$i]['cid'], $imgs[$i]['file_name'], $mail->encoding, $imgs[$i]['type']); + $mail->AddEmbeddedImageString($imgs[$i]['contents'], $imgs[$i]['cid'], $imgs[$i]['file_name'], 'base64', $imgs[$i]['type']); } elseif (method_exists($mail,'AddStringEmbeddedImage')) { ## PHPMailer 5.2.5 and up renamed the method ## https://github.com/Synchro/PHPMailer/issues/42#issuecomment-16217354 - $mail->AddStringEmbeddedImage($imgs[$i]['contents'], $imgs[$i]['cid'], $imgs[$i]['file_name'], $mail->encoding, $imgs[$i]['type']); + $mail->AddStringEmbeddedImage($imgs[$i]['contents'], $imgs[$i]['cid'], $imgs[$i]['file_name'], 'base64', $imgs[$i]['type']); } elseif (isset($mail->attachment) && is_array($mail->attachment)) { // Append to $attachment array $cur = count($mail->attachment); @@ -579,4 +579,4 @@ function messageHeaders($mail) { } return ''; } -} \ No newline at end of file +}