Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
TYPO3
sg_mail
Commits
e43193d2
Commit
e43193d2
authored
Sep 20, 2016
by
Torsten Oppermann
Browse files
[TASK] Fixing missing import. Adding Hook into Formhandler
parent
05f67118
Changes
1
Hide whitespace changes
Inline
Side-by-side
Classes/Service/MailTemplateService.php
View file @
e43193d2
...
...
@@ -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
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment