Skip to content
Snippets Groups Projects
Commit 59ab03a7 authored by Philipp Nowinski's avatar Philipp Nowinski
Browse files

[BUGFIX] use the default sender address if it is provided in the...

[BUGFIX] use the default sender address if it is provided in the LocalConfiguration; use TS constant as fallback
parent 62510687
No related branches found
No related tags found
1 merge request!3New version 4 1
......@@ -165,7 +165,13 @@ class MailTemplateService {
/** @var PersistenceManager persistenceManager */
$this->persistenceManager = $this->objectManager->get(PersistenceManager::class);
$this->fromAddress = $this->tsSettings['mail']['default']['from'];
// use defaultMailFromAddress if it is provided in LocalConfiguration.php; use the sg_mail TS setting as fallback
if ($GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress']) {
$this->fromAddress = $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'];
} else {
$this->fromAddress = $this->tsSettings['mail']['default']['from'];
}
$this->mailMessage->setFrom($this->fromAddress);
$this->bccAddresses = GeneralUtility::trimExplode(',', $this->tsSettings['mail']['default']['bcc']);
$this->ccAddresses = GeneralUtility::trimExplode(',', $this->tsSettings['mail']['default']['cc']);
......
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