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
6bfac0b6
Commit
6bfac0b6
authored
8 years ago
by
Torsten Oppermann
Browse files
Options
Downloads
Patches
Plain Diff
[TASK] Both Languages are now sent in the preview mail, if they are different
parent
49603304
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Classes/Controller/MailController.php
+16
-2
16 additions, 2 deletions
Classes/Controller/MailController.php
with
16 additions
and
2 deletions
Classes/Controller/MailController.php
+
16
−
2
View file @
6bfac0b6
...
...
@@ -260,9 +260,10 @@ class MailController extends ActionController {
* @param string $selectedTemplateKey
* @param string $selectedExtensionKey
* @param string $selectedLanguageLeft
* @param string $selectedLanguageRight
*/
public
function
sendTestMailAction
(
$emailAddress
,
$selectedExtensionKey
,
$selectedTemplateKey
,
$selectedLanguageLeft
$emailAddress
,
$selectedExtensionKey
,
$selectedTemplateKey
,
$selectedLanguageLeft
,
$selectedLanguageRight
)
{
if
(
!
filter_var
(
$this
->
settings
[
'mail'
][
'test'
][
'from'
],
FILTER_VALIDATE_EMAIL
))
{
...
...
@@ -282,8 +283,21 @@ class MailController extends ActionController {
$mailTemplateService
->
setSubject
(
$this
->
settings
[
'mail'
][
'test'
][
'subject'
]);
$mailTemplateService
->
setTemplateName
(
$selectedTemplateKey
);
$mailTemplateService
->
setExtensionKey
(
$selectedExtensionKey
);
$mailIsSend
=
$mailTemplateService
->
sendEmail
(
TRUE
);
if
(
$selectedLanguageRight
!==
$selectedLanguageLeft
)
{
/** @var \SGalinski\SgMail\Service\MailTemplateService $mailTemplateService */
$mailTemplateService
=
$objectManager
->
get
(
MailTemplateService
::
class
);
$mailTemplateService
->
setLanguage
(
$selectedLanguageRight
);
$mailTemplateService
->
setToAddresses
(
$emailAddress
);
$mailTemplateService
->
setFromAddress
(
$this
->
settings
[
'mail'
][
'test'
][
'from'
]);
$mailTemplateService
->
setSubject
(
$this
->
settings
[
'mail'
][
'test'
][
'subject'
]);
$mailTemplateService
->
setTemplateName
(
$selectedTemplateKey
);
$mailTemplateService
->
setExtensionKey
(
$selectedExtensionKey
);
$mailIsSend
=
$mailTemplateService
->
sendEmail
(
TRUE
);
}
if
(
$mail
TemplateService
->
sendEmail
(
true
)
)
{
if
(
$mail
IsSend
)
{
$message
=
LocalizationUtility
::
translate
(
'backend.success_mail'
,
'sg_mail'
);
$this
->
addFlashMessage
(
$message
,
''
,
FlashMessage
::
OK
);
}
else
{
...
...
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