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
8cd2ba9f
Commit
8cd2ba9f
authored
Feb 07, 2019
by
Kevin Ditscheid
Browse files
[BUGFIX] Fix the preview mail sending
parent
49b2dee7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Classes/Service/MailTemplateService.php
View file @
8cd2ba9f
...
...
@@ -651,14 +651,18 @@ class MailTemplateService {
$emailBody
=
nl2br
(
$emailBody
);
$emailBody
=
preg_replace
(
'/(<br[\s]?[\/]?>[\s]*){3,}/'
,
'<br><br>'
,
$emailBody
);
if
(
!
$isPreview
)
{
$mail
=
$this
->
addMailToMailQueue
(
$this
->
extensionKey
,
$this
->
templateName
,
$subject
,
$emailBody
,
$this
->
priority
,
0
,
0
,
$this
->
language
,
$siteRootId
);
if
(
$this
->
ignoreMailQueue
)
{
$success
=
$this
->
sendMailFromQueue
(
$mail
->
getUid
());
}
$mail
=
$this
->
addMailToMailQueue
(
$this
->
extensionKey
,
$this
->
templateName
,
$subject
,
$emailBody
,
$this
->
priority
,
0
,
0
,
$this
->
language
,
$siteRootId
);
if
(
$this
->
ignoreMailQueue
)
{
$success
=
$this
->
sendMailFromQueue
(
$mail
->
getUid
());
}
if
(
$isPreview
)
{
$mailRepository
=
$this
->
objectManager
->
get
(
MailRepository
::
class
);
$mailRepository
->
remove
(
$mail
);
$this
->
persistenceManager
->
persistAll
();
}
return
$success
;
...
...
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