Commit e43193d2 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Fixing missing import. Adding Hook into Formhandler

parent 05f67118
......@@ -7,6 +7,7 @@ use SGalinski\SgMail\Domain\Repository\MailRepository;
use TYPO3\CMS\Core\Mail\MailMessage;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Fluid\View\StandaloneView;
/***************************************************************
* Copyright notice
......@@ -42,6 +43,20 @@ class MailTemplateService {
*/
private static $registerArray = [];
/**
* Hook into Formhandler
* gets called in the finisher of the typoscript
*
* @param $gp
* @param $tsConfig
*/
public function init($gp, $tsConfig) {
self::sendEmail(
NULL, $tsConfig['template_key'], $tsConfig['extension_key'], $tsConfig['to_address'],
$tsConfig['from_address'], $tsConfig['subject'], $gp, $tsConfig['ignore_mail_queue']
);
}
/**
* register a template with sg_mail
*
......
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