Skip to content
Snippets Groups Projects
Commit 4286da9e authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Add possibility to add a fallback html template

parent 05531656
No related branches found
Tags 5.3.1
1 merge request!10Feature improved usability
......@@ -301,7 +301,13 @@ class MailTemplateService {
$defaultTemplateContent = self::getRegisterArray(
)[$this->extensionKey][$this->templateName]['templateContent'];
} else {
return FALSE;
$defaultTemplateFile = $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultHtmlTemplate'];
if (file_exists($defaultTemplateFile)) {
$defaultTemplateContent = file_get_contents($defaultTemplateFile);
} else {
return FALSE;
}
}
}
} elseif (filter_var($template->getToAddress(), FILTER_VALIDATE_EMAIL)) {
......
......@@ -18,6 +18,9 @@ module.tx_sgmail {
# extension where automatic generated registrations from forms are put. gets appended with /Configuration/MailTemplates/. make sure these folders exist!
configurationLocation = project_theme
# default html template file, which serves as a fallback for all mail templates
defaultHtmlTemplate = EXT:project_theme/Configuration/MailTemplates/Default.html
}
# default template language
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment