Skip to content

Commit

Permalink
Merge pull request cypht-org#1272 from Baraka24/fix-deprecated-mb_con…
Browse files Browse the repository at this point in the history
…vert_encoding

[FIX]hm-mime-message.php: Replace the mb_convert_encoding() function …
  • Loading branch information
kambereBr authored Oct 10, 2024
2 parents 42c320f + ebfb777 commit 5b6569b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules/smtp/hm-mime-message.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,7 @@ function format_message_text($body) {
function prep_message_body() {
$body = $this->body;
if (!$this->html) {
$body = mb_convert_encoding(trim($body), "HTML-ENTITIES", "UTF-8");
$body = mb_convert_encoding($body, "UTF-8", "HTML-ENTITIES");
$body = htmlspecialchars(trim($body), ENT_QUOTES | ENT_HTML5, 'UTF-8');
if (!empty($this->attachments)) {
$this->headers['Content-Type'] = 'multipart/mixed; boundary='.$this->boundary;
$body = sprintf("--%s\r\nContent-Type: text/plain; charset=UTF-8; format=flowed\r\nContent-Transfer-Encoding: quoted-printable\r\n\r\n%s",
Expand Down

0 comments on commit 5b6569b

Please sign in to comment.