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
4286da9e
Commit
4286da9e
authored
6 years ago
by
Torsten Oppermann
Browse files
Options
Downloads
Patches
Plain Diff
[TASK] Add possibility to add a fallback html template
parent
05531656
No related branches found
Branches containing commit
Tags
5.3.1
Tags containing commit
1 merge request
!10
Feature improved usability
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/Service/MailTemplateService.php
+7
-1
7 additions, 1 deletion
Classes/Service/MailTemplateService.php
Configuration/TypoScript/setup.ts
+3
-0
3 additions, 0 deletions
Configuration/TypoScript/setup.ts
with
10 additions
and
1 deletion
Classes/Service/MailTemplateService.php
+
7
−
1
View file @
4286da9e
...
...
@@ -301,7 +301,13 @@ class MailTemplateService {
$defaultTemplateContent
=
self
::
getRegisterArray
(
)[
$this
->
extensionKey
][
$this
->
templateName
][
'templateContent'
];
}
else
{
return
FALSE
;
$defaultTemplateFile
=
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'MAIL'
][
'defaultHtmlTemplate'
];
if
(
file_exists
(
$defaultTemplateFile
))
{
$defaultTemplateContent
=
file_get_contents
(
$defaultTemplateFile
);
}
else
{
return
FALSE
;
}
}
}
}
elseif
(
filter_var
(
$template
->
getToAddress
(),
FILTER_VALIDATE_EMAIL
))
{
...
...
This diff is collapsed.
Click to expand it.
Configuration/TypoScript/setup.ts
+
3
−
0
View file @
4286da9e
...
...
@@ -18,6 +18,9 @@ module.tx_sgmail {
#
extension
where
automatic
generated
registrations
from
forms
are
put
.
gets
appended
with
/Configuration/
MailTemplates
/
.
make
sure
these
folders
exist
!
configurationLocation
=
project_theme
#
default
html
template
file
,
which
serves
as
a
fallback
for
all
mail
templates
defaultHtmlTemplate
=
EXT
:
project_theme
/
Configuration
/
MailTemplates
/
Default
.
html
}
#
default
template
language
...
...
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