Skip to content
GitLab
Menu
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
491a72d1
Commit
491a72d1
authored
Oct 05, 2016
by
Stefan Galinski
🎮
Browse files
[BUGFIX] Fix some final issues
parent
6d003091
Changes
2
Hide whitespace changes
Inline
Side-by-side
Classes/Controller/MailController.php
View file @
491a72d1
...
...
@@ -253,7 +253,7 @@ class MailController extends ActionController {
$mailTemplateService
->
setFromAddress
(
'noreply@example.org'
);
$mailTemplateService
->
setTemplateName
(
$selectedTemplateKey
);
$mailTemplateService
->
setExtensionKey
(
$selectedExtensionKey
);
$mailIsSend
=
$mailTemplateService
->
sendEmail
(
$this
->
settings
[
'mail'
][
'test'
][
'subject'
],
TRUE
);
$mailIsSend
=
$mailTemplateService
->
sendEmail
(
TRUE
);
if
(
$selectedLanguageRight
!==
$selectedLanguageLeft
)
{
/** @var \SGalinski\SgMail\Service\MailTemplateService $mailTemplateService */
...
...
@@ -263,7 +263,7 @@ class MailController extends ActionController {
$mailTemplateService
->
setFromAddress
(
'noreply@example.org'
);
$mailTemplateService
->
setTemplateName
(
$selectedTemplateKey
);
$mailTemplateService
->
setExtensionKey
(
$selectedExtensionKey
);
$mailIsSend
=
$mailTemplateService
->
sendEmail
(
$this
->
settings
[
'mail'
][
'test'
][
'subject'
],
TRUE
);
$mailIsSend
=
$mailTemplateService
->
sendEmail
(
TRUE
);
}
if
(
$mailIsSend
)
{
...
...
Classes/Service/MailTemplateService.php
View file @
491a72d1
...
...
@@ -168,6 +168,7 @@ class MailTemplateService {
* @param string $templatePath
* @param string $description
* @param array $markers
* @param array $subjects
*/
public
static
function
registerTemplate
(
$extension
,
$templateName
,
$templatePath
,
$description
,
array
$markers
,
array
$subjects
...
...
@@ -194,15 +195,14 @@ class MailTemplateService {
/**
* Send the Email
*
* @param string $subject
* @param boolean $isPreview
* @return boolean email was sent or added to mail queue successfully?
*/
public
function
sendEmail
(
$subject
=
''
,
$isPreview
=
FALSE
)
{
public
function
sendEmail
(
$isPreview
=
FALSE
)
{
/** @var Template $template */
$template
=
$this
->
templateRepository
->
findTemplate
(
$template
=
$this
->
templateRepository
->
find
OneBy
Template
(
$this
->
extensionKey
,
$this
->
templateName
,
$this
->
language
)
->
getFirst
(
);
);
// If there is no template for this language, use the default template
if
(
$template
===
NULL
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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