Commit 6a50e416 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixes #12701 'spaces in mails'

parent 92ba654f
Pipeline #5369 passed with stages
in 3 minutes and 19 seconds
......@@ -235,6 +235,18 @@ Switch off the TLS encryption. In :ref:`configuration` specify for *config.sendE
-o tls=no
.. _`sendEmailSpaces`:
sendEmail: 'random' injected spaces
If in emails unwanted spaces appear, please check that the body does not contain lines longer than 1000 characters.
The spaces will be inserted by the email system in such long lines and has nothing to do with QFQ.
In HTML mails, this
situation might happen if all newlines will be replaced by ``<br>``. To prevent this situation, QFQ will check for
``<br>`` (without newline) and add automatically a newline behind it. This applies only to email body texts.
.. _`javascriptProblem`:
Javascript problem
......@@ -155,7 +155,11 @@ class SendMail {
$mailConfig[SENDMAIL_TOKEN_BODY] = str_ireplace("<br>", "<br>\r\n", $mailConfig[SENDMAIL_TOKEN_BODY]);
// At least HTML code cleaned by QNL2BR() is missing any '\r\n'. A typicall MTA will inject a line break every 1000 Characters -
// this might be in the middle of a word or URL. To prevent this, reinsert '\r\n' after each <br>.
// First normalize existing "<br>\r\n" to "<br>", than replace "<br>" by "<br>\r\n".
$mailConfig[SENDMAIL_TOKEN_BODY] = str_ireplace("<br>", "<br>\r\n",
str_ireplace("<br>\r\n", "<br>", $mailConfig[SENDMAIL_TOKEN_BODY]));
foreach ($mailConfig as $key => $value) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment