Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions plugins/inlineImagePlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -579,4 +579,4 @@ function messageHeaders($mail) {
}
return '';
}
}
}