Usually a linebreak is a \n (or LF, line feed), however when sending mails the standard says this LF must be escaped with a \r (or CR, carriage return). so \n shuold be \r\n
Escaping the email text like the following will do the trick:
$escapedString = str_replace("\r\r\n", "\r\n", str_replace("\n", "\r\n", $unescapedString));
No comments:
Post a Comment