Commit 39ac98f5 authored by Kevin Ditscheid's avatar Kevin Ditscheid
Browse files

[BUGFIX] Trim from name and email address on loading template vars

parent 14c38fc6
......@@ -793,12 +793,12 @@ class MailTemplateService {
* @param Template $template
*/
private function loadTemplateValues($template) {
$fromName = $template->getFromName();
$fromName = \trim($template->getFromName());
if ($fromName === '' && $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']) {
$fromName = $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'];
}
$fromMail = $template->getFromMail();
$fromMail = \trim($template->getFromMail());
if (!filter_var($fromMail, FILTER_VALIDATE_EMAIL)) {
$fromMail = $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'];
if (!filter_var($GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'], FILTER_VALIDATE_EMAIL)) {
......
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