Commit d4193b55 authored by Christopher Zechendorf's avatar Christopher Zechendorf
Browse files

[RELEASE] 0.9.3 mailFrom handling - fixes #21

parent d3c7dc95
......@@ -165,10 +165,18 @@ class CreateHelper {
$mailBody->assign('confirmationPageUid',$this->additionalData['confirmationPageUid']);
}
// define mailFromArray
$mailFromArray = array(
($this->settings['mailFromAddress'] ? $this->settings['mailFromAddress'] : $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'])
=>
($this->settings['mailFromName'] ? $this->settings['mailFromName'] : $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'])
);
// send email
$mail = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Mail\\MailMessage');
$mail
->setSubject($mailSubject)
->setFrom($mailFromArray)
->setTo(array($this->frontendUser->getEmail() => $this->frontendUser->getFirstName() . ' ' .$this->frontendUser->getLastName()))
->setBody($mailBody->render(),'text/html')
->send();
......
......@@ -33,9 +33,9 @@ tx_selfregistration {
# cat=selfregistration; label=ID of the page where FrontendUsers are stored
validationMailTemplateFile = typo3conf/ext/selfregistration/Resources/Private/Templates/FrontendUser/ConfirmationMail.html
# cat=selfregistration; label=Optional: mail sender name
mailSenderName =
# cat=selfregistration; label=Optional: mail from name
mailFromName =
# cat=selfregistration; label=Optional: mail sender email address
mailSenderEmail =
# cat=selfregistration; label=Optional: mail from address
mailFromAddress =
}
......@@ -15,8 +15,8 @@ plugin.tx_selfregistration {
validationRequiredPid = {$tx_selfregistration.validationRequiredPid}
validationSuccessfulPid = {$tx_selfregistration.validationSuccessfulPid}
validationMailTemplateFile = {$tx_selfregistration.validationMailTemplateFile}
mailSenderName = $tx_selfregistration.mailSenderName}
mailSenderEmail = $tx_selfregistration.mailSenderEmail}
mailFromName = {$tx_selfregistration.mailFromName}
mailFromAddress = {$tx_selfregistration.mailFromAddress}
}
}
......
......@@ -20,7 +20,7 @@ $EM_CONF[$_EXTKEY] = array(
'uploadfolder' => '0',
'createDirs' => '',
'clearCacheOnLoad' => 0,
'version' => '0.9.2',
'version' => '0.9.3',
'constraints' => array(
'depends' => array(
'typo3' => '8.7.0-8.7.99',
......
Markdown is supported
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