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
......@@ -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']);
......
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