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

[TASK] Add setting to ignore the mail queue with the forms finisher

parent 4286da9e
No related branches found
Tags 5.3.1
1 merge request!10Feature improved usability
......@@ -70,13 +70,15 @@ class FormsFinisher extends AbstractFinisher {
$templateName = $formDefinition->getIdentifier();
}
$ignoreMailQueue = (boolean) $this->parseOption('ignoreMailQueue');
$objectManager = GeneralUtility::makeInstance(ObjectManager::class);
/** @var \SGalinski\SgMail\Service\MailTemplateService $mailTemplateService */
$mailTemplateService = $objectManager->get(
MailTemplateService::class, $templateName, $this->parseOption('extension'), $markers
);
$mailTemplateService->setIgnoreMailQueue(FALSE);
$mailTemplateService->setIgnoreMailQueue($ignoreMailQueue);
$mailTemplateService->setLanguage($GLOBALS['TSFE']->config['config']['language']);
$mailTemplateService->setSubject($this->parseOption('subject'));
$mailTemplateService->setToAddresses($this->parseOption('mailTo'));
......
......@@ -14,6 +14,7 @@ TYPO3:
extension: 'sg_mail'
template: ''
automaticRegistration: ''
ignoreMailQueue: true
mailTo: ''
subject: ''
userName: ''
......@@ -30,6 +31,7 @@ TYPO3:
extension: 'sg_mail'
template: ''
automaticRegistration: ''
ignoreMailQueue: true
mailTo: ''
mailFrom: ''
subject: ''
......@@ -75,6 +77,11 @@ TYPO3:
templateName: 'Inspector-CheckboxEditor'
label: 'Automatic Registration (If selected, you can find your template in the "Mail Template" module after saving. Look for the extension and template key in the dropdown in the upper left corner of the template editor.'
propertyPath: 'options.automaticRegistration'
127:
identifier: 'ignoreMailQueue'
templateName: 'Inspector-CheckboxEditor'
label: 'If selected, the mails are send immediately, otherwise the mails are added to the Mail Queue. See the Readme of the sg_mail extension for more Informations.'
propertyPath: 'options.ignoreMailQueue'
130:
identifier: 'mailTo'
templateName: 'Inspector-TextEditor'
......@@ -139,6 +146,11 @@ TYPO3:
templateName: 'Inspector-CheckboxEditor'
label: 'Automatic Registration (If selected, you can find your template in the "Mail Template" module after saving. Look for the extension and template key in the dropdown in the upper left corner of the template editor.'
propertyPath: 'options.automaticRegistration'
127:
identifier: 'ignoreMailQueue'
templateName: 'Inspector-CheckboxEditor'
label: 'If selected, the mails are send immediately, otherwise the mails are added to the Mail Queue. See the Readme of the sg_mail extension for more Informations.'
propertyPath: 'options.ignoreMailQueue'
130:
identifier: 'mailTo'
templateName: 'Inspector-TextEditor'
......
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