Commit aad28c51 authored by Paul Ilea's avatar Paul Ilea
Browse files

[BUGFIX] Fix from name and address fallback priority

parent f63d6e68
......@@ -831,11 +831,17 @@ class MailTemplateService {
*/
private function loadTemplateValues($template): void {
$fromName = \trim($template->getFromName());
if ($fromName === '') {
$fromName = $this->fromName;
}
if ($fromName === '' && $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']) {
$fromName = $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'];
}
$fromMail = \trim($template->getFromMail());
if (!filter_var($fromMail, FILTER_VALIDATE_EMAIL)) {
$fromMail = $this->fromAddress;
}
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