OK entumas, here the same problem with "\n" for line break.
I have observed the same thing.
My configuration:
CB 2.0.14
PHP-Version 5.5.5
Webserver Apache/2.2.15 (CentOS)
Joomla!-Version Joomla! 3.5.1 Stable [ Unicorn ]
Joomla!-Plattform-Version Joomla Platform 13.1.0 Stable [ Curiosity ]
THE PROBLEM:
"\n" is entered as a line break in some values in the "/components/com_comprofiler/plugin/language/default_language/language.php".
From PHP work, programming with Formmailer and work with notepad++ I know that with the "\n" for line break.
"\n" or "\r" or "\r\n" is for line break in plain text.
In the CB Formmailer "/libraries/CBLib/CBPHPMailer/CBPHPMailer.php" the "Content-type" setting have this PHP-Code:
Code:
/**
* Sets message type to HTML or plain.
* @param boolean $isHtml True for HTML mode.
* @return void
*/
public function isHTML($isHtml = true)
{
if ($isHtml) {
$this->ContentType = 'text/html';
} else {
$this->ContentType = 'text/plain';
}
}
Line break by "text/html; charset=UTF-8" is "<br>"
Line break by "text/plain; charset=UTF-8". is "\n" or "\r" or "\r\n".
The "Registration Email HTML setting to Yes / NO" has something to do with it.
The best solution that I propose is:
"Registration Email HTML set to NO" and use for linebreak "\n" or "\r" or "\r\n" in the language.php AND normal line break with the Escape Key for the Registrations and Welcome Email in the Amdin Area Backend Formfield.
Why:
Email is not for HTML!
(\n and \r is for different Operating Systems)
Another solution may be:
"Registration Email HTML set to YES" and replace in the language.php all "\n" or "\r" or "\r\n" to <br> for line break. OR write normal line breaks with the Escape Key.
Use CB Language Override. (search for tutorial).
I've tested now once.
If "Registration Email HTML set to YES" and in the file language.php the "\n" by "<br>" replaced, then line breaks are set in the email. (Content-Type: text/html; charset=UTF-
If "Registration Email HTML set to NO" and in the language.php file are "\n", then line breaks are set in the email. (Content-Type: text/plain; charset=UTF-
But when used in the Admin Area in Backend at the Registration and welcome email <br>, in these emails will not work the linebreaks.
Is one of two different, then it does not work.
ATTENTION: "\n" don't work in the Admin Area Backend Formfields for Registration-Emails, when is set to HTML NO. Use normal line breaks with Escape Key.
I advise to "Registration Email HTML set to NO". This saves the rewrite of language.php.
There is definitely a CB bug / conflict with language.php
PS: "notify me of new replies".
On the TOP of these site you have a bottom with "subscribe" or "unsubscribe".
Or visit your Profile here and the Notify settings.