[eluser]Unknown[/eluser]
file:
libraries/Email.php
Current code:
Code:
function message($body)
{
$this->_body = stripslashes(rtrim(str_replace("\r", "", $body)));
}
The problem is that if you want to use "
\r\n" as new-line for the (text) email body you will not succeed. All "
\r\n"s will be converted to "
\n". (And some SMTP servers will raise an error!).
In order to fix this I added an extra line:
Code:
function message($body)
{
$this->_body = stripslashes(rtrim(str_replace("\r", "", $body)));
$this->_body = str_replace("\n", "".$this->newline, $body);
}
So it will change all
\r\n to
\n and after that it will change all
\n to whatever new-line character you set.
PS: I didn't fill a Bug Report because I don't know if this is a bug or if I am missing something.