Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_mail
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_mail
Commits
d82b1f3f
Commit
d82b1f3f
authored
8 years ago
by
Torsten Oppermann
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of gitlab.sgalinski.de:typo3/sg_mail into HEAD
parents
feb7c6b7
491a72d1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/Controller/MailController.php
+2
-2
2 additions, 2 deletions
Classes/Controller/MailController.php
Classes/Service/MailTemplateService.php
+4
-4
4 additions, 4 deletions
Classes/Service/MailTemplateService.php
with
6 additions
and
6 deletions
Classes/Controller/MailController.php
+
2
−
2
View file @
d82b1f3f
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Classes/Service/MailTemplateService.php
+
4
−
4
View file @
d82b1f3f
...
...
@@ -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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment