PHPMailer\PHPMailer\PHPMailer::fixEOL PHP Method

fixEOL() public method

Changes every end of line from CRLF, CR or LF to $this->LE.
public fixEOL ( string $str ) : string
$str string String to fixEOL
return string
    public function fixEOL($str)
    {
        // Normalise to \n
        $nstr = str_replace(["\r\n", "\r"], "\n", $str);
        // Now convert LE as needed
        if ("\n" !== $this->LE) {
            $nstr = str_replace("\n", $this->LE, $nstr);
        }
        return $nstr;
    }