Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
6a50e416
Commit
6a50e416
authored
Jun 29, 2021
by
Carsten Rose
Browse files
Fixes #12701 'spaces in mails'
parent
92ba654f
Pipeline
#5369
passed with stages
in 3 minutes and 19 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Documentation/GeneralTips.rst
View file @
6a50e416
...
...
@@ -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
...
...
extension/Classes/Core/Report/SendMail.php
View file @
6a50e416
...
...
@@ -155,7 +155,11 @@ class SendMail {
if
(
isset
(
$mailConfig
[
SENDMAIL_TOKEN_BODY_MODE
])
&&
$mailConfig
[
SENDMAIL_TOKEN_BODY_MODE
]
===
SENDMAIL_TOKEN_BODY_MODE_HTML
)
{
$mailConfig
[
SENDMAIL_TOKEN_BODY
]
=
Support
::
wrapTag
(
SENDMAIL_HTML_TOKEN
,
$mailConfig
[
SENDMAIL_TOKEN_BODY
]);
$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
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment