Skip to content

Instantly share code, notes, and snippets.

@gadost
Created December 13, 2023 08:21
Show Gist options
  • Select an option

  • Save gadost/d21612d4b81ac39c6241b7eb8290d927 to your computer and use it in GitHub Desktop.

Select an option

Save gadost/d21612d4b81ac39c6241b7eb8290d927 to your computer and use it in GitHub Desktop.
Opencart fix BASE64_LENGTH_79_INF
// system/library/mail/smtp.php
private function base64_encode_chunks($input, $line_length = 76) {
$base64_data = base64_encode($input);
$output = '';
while ($base64_data) {
$output .= substr($base64_data, 0, $line_length) . "\r\n";
$base64_data = substr($base64_data, $line_length);
}
return $output;
}
// change $message .= base64_encode($this->html) . PHP_EOL; to :
$message .= $this->base64_encode_chunks($this->html) . PHP_EOL;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment