Menu

#8 Base64 HTML body not MIME wrapped in GetMsgPart()

1.0
closed
None
2026-08-11
2026-08-10
No

This issue occurs in function GetMsgPart() starting line 1293, whenever a mail is sent as HTML. WrapText() wraps on whitespace. Base64 contains no whitespace, therefore the complete HTML body becomes one very long line.
Exim rejects the message with:
550 Maximum line length here is 2000 characters

Current code
$html .= self::WrapText(base64_encode($this->messageHTML), $this->wordWrapLen);

Fix

$html .= chunk_split(
    base64_encode($this->messageHTML),
    76,
    self::CRLF
);

Discussion

  • Andy Prevost (CodeworxTech)

    accepted as reported with fix as reported (contained in Aug 10 2026 release)

     
  • Andy Prevost (CodeworxTech)

    • status: open --> closed
     

Log in to post a comment.