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
62cfde25
Commit
62cfde25
authored
6 years ago
by
Stefan Galinski
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] Another bunch of fixes. (default mail was never used, form mailing could crash)
parent
a02f35f5
No related branches found
Branches containing commit
Tags
4.1.0
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/Finisher/Forms/FormsFinisher.php
+8
-11
8 additions, 11 deletions
Classes/Finisher/Forms/FormsFinisher.php
Classes/Service/MailTemplateService.php
+1
-1
1 addition, 1 deletion
Classes/Service/MailTemplateService.php
with
9 additions
and
12 deletions
Classes/Finisher/Forms/FormsFinisher.php
+
8
−
11
View file @
62cfde25
...
...
@@ -46,12 +46,9 @@ class FormsFinisher extends AbstractFinisher {
];
/**
*
* Send email with the sgmail api to one or more recipients
* overwrites the mail markers with custom identifiers if provided
*
* @see AbstractFinisher::execute()
*
* @throws \InvalidArgumentException
* @throws \BadFunctionCallException
* @throws \TYPO3\CMS\Core\Cache\Exception\NoSuchCacheException
...
...
@@ -92,8 +89,8 @@ class FormsFinisher extends AbstractFinisher {
}
}
$templateName
=
trim
(
$this
->
parseOption
(
'template'
));
if
(
$
this
->
parseOption
(
'
template
'
)
===
''
)
{
$templateName
=
trim
(
(
string
)
$this
->
parseOption
(
'template'
));
if
(
$template
Name
===
''
)
{
$templateName
=
$formDefinition
->
getIdentifier
();
}
...
...
@@ -107,32 +104,32 @@ class FormsFinisher extends AbstractFinisher {
$mailTemplateService
->
setIgnoreMailQueue
(
$ignoreMailQueue
);
$mailTemplateService
->
setLanguage
(
$GLOBALS
[
'TSFE'
]
->
config
[
'config'
][
'language'
]);
$mailToAdresses
=
trim
(
$this
->
parseOption
(
'mailTo'
));
$mailToAdresses
=
trim
(
(
string
)
$this
->
parseOption
(
'mailTo'
));
if
(
$mailToAdresses
!==
''
)
{
$mailTemplateService
->
setToAddresses
(
$this
->
parseOption
(
'mailTo'
));
}
$fromAddress
=
trim
(
$this
->
parseOption
(
'mailFrom'
));
$fromAddress
=
trim
(
(
string
)
$this
->
parseOption
(
'mailFrom'
));
if
(
$fromAddress
!==
''
)
{
$mailTemplateService
->
setFromAddress
(
$fromAddress
);
}
$fromName
=
trim
(
$this
->
parseOption
(
'userName'
));
$fromName
=
trim
(
(
string
)
$this
->
parseOption
(
'userName'
));
if
(
$fromName
!==
''
)
{
$mailTemplateService
->
setFromName
(
$fromName
);
}
$replyTo
=
trim
(
$this
->
parseOption
(
'replyTo'
));
$replyTo
=
trim
(
(
string
)
$this
->
parseOption
(
'replyTo'
));
if
(
$replyTo
!==
''
)
{
$mailTemplateService
->
setReplyToAddress
(
$replyTo
);
}
$ccAddresses
=
trim
(
$this
->
parseOption
(
'cc'
));
$ccAddresses
=
trim
(
(
string
)
$this
->
parseOption
(
'cc'
));
if
(
$ccAddresses
!==
''
)
{
$mailTemplateService
->
setCcAddresses
(
$ccAddresses
);
}
$bccAddresses
=
trim
(
$this
->
parseOption
(
'bcc'
));
$bccAddresses
=
trim
(
(
string
)
$this
->
parseOption
(
'bcc'
));
if
(
$bccAddresses
!==
''
)
{
$mailTemplateService
->
setBccAddresses
(
$bccAddresses
);
}
...
...
This diff is collapsed.
Click to expand it.
Classes/Service/MailTemplateService.php
+
1
−
1
View file @
62cfde25
...
...
@@ -173,7 +173,7 @@ class MailTemplateService {
$this
->
persistenceManager
=
$this
->
objectManager
->
get
(
PersistenceManager
::
class
);
// use defaultMailFromAddress if it is provided in LocalConfiguration.php; use the sg_mail TS setting as fallback
if
(
!
filter_var
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'MAIL'
][
'defaultMailFromAddress'
],
FILTER_VALIDATE_EMAIL
))
{
if
(
filter_var
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'MAIL'
][
'defaultMailFromAddress'
],
FILTER_VALIDATE_EMAIL
))
{
$this
->
fromAddress
=
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'MAIL'
][
'defaultMailFromAddress'
];
}
else
{
$this
->
fromAddress
=
$tsSettings
[
'mail'
][
'default'
][
'from'
];
...
...
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