Skip to content

Commit 8a81b78

Browse files
committed
[BUGFIX] Use default values for ReplyTo option
1 parent 75fd644 commit 8a81b78

2 files changed

Lines changed: 52 additions & 23 deletions

File tree

Classes/Domain/Service/SendMailService.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
namespace In2code\Femanager\Domain\Service;
66

7+
use Doctrine\DBAL\Types\GuidType;
78
use In2code\Femanager\Event\AfterMailSendEvent;
89
use In2code\Femanager\Event\BeforeMailBodyRenderEvent;
910
use In2code\Femanager\Event\BeforeMailSendEvent;
@@ -13,6 +14,7 @@
1314
use Psr\EventDispatcher\EventDispatcherInterface;
1415
use Symfony\Component\Mime\Part\DataPart;
1516
use TYPO3\CMS\Core\Mail\MailMessage;
17+
use TYPO3\CMS\Core\Utility\DebugUtility;
1618
use TYPO3\CMS\Core\Utility\GeneralUtility;
1719
use TYPO3\CMS\Extbase\Mvc\RequestInterface;
1820

@@ -221,6 +223,9 @@ protected function setCc(array $typoScript, MailMessage $email): void
221223

222224
protected function setReplyTo(array $typoScript, MailMessage $email): void
223225
{
226+
if (is_null( $typoScript['replyTo'] ?? null)) {
227+
return;
228+
}
224229
$replyTo = $this->contentObject->cObjGetSingle($typoScript['replyTo'], $typoScript['replyTo.']);
225230
if ($replyTo) {
226231
$email->setReplyTo(GeneralUtility::trimExplode(',', $replyTo, true));

Configuration/TypoScript/Main/setup.typoscript

Lines changed: 47 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ plugin.tx_femanager {
229229

230230
# Set reply to receivers (comma separated list for multiple reply to receivers)
231231
replyTo = TEXT
232-
replyTo.value =
232+
# replyTo.value =
233+
# use reply to per default for the sender configuration
234+
replyTo < .sender.email
233235

234236
# Set mail priority from 1 to 5
235237
priority = TEXT
@@ -322,8 +324,10 @@ plugin.tx_femanager {
322324
cc.value =
323325

324326
# Set reply to receivers (comma separated list for multiple reply to receivers)
325-
replyTo = TEXT
326-
replyTo.value =
327+
#replyTo = TEXT
328+
#replyTo.value =
329+
# use reply to per default for the sender configuration
330+
replyTo < .sender.email
327331

328332
# Set mail priority from 1 to 5
329333
priority = TEXT
@@ -401,8 +405,10 @@ plugin.tx_femanager {
401405
cc.value =
402406

403407
# Set reply to receivers (comma separated list for multiple reply to receivers)
404-
replyTo = TEXT
405-
replyTo.value =
408+
#replyTo = TEXT
409+
#replyTo.value =
410+
# use reply to per default for the sender configuration
411+
replyTo < .sender.email
406412

407413
# Set mail priority from 1 to 5
408414
priority = TEXT
@@ -480,8 +486,10 @@ plugin.tx_femanager {
480486
cc.value =
481487

482488
# Set reply to receivers (comma separated list for multiple reply to receivers)
483-
replyTo = TEXT
484-
replyTo.value =
489+
#replyTo = TEXT
490+
#replyTo.value =
491+
# use reply to per default for the sender configuration
492+
replyTo < .sender.email
485493

486494
# Set mail priority from 1 to 5
487495
priority = TEXT
@@ -559,8 +567,10 @@ plugin.tx_femanager {
559567
cc.value =
560568

561569
# Set reply to receivers (comma separated list for multiple reply to receivers)
562-
replyTo = TEXT
563-
replyTo.value =
570+
#replyTo = TEXT
571+
#replyTo.value =
572+
# use reply to per default for the sender configuration
573+
replyTo < .sender.email
564574

565575
# Set mail priority from 1 to 5
566576
priority = TEXT
@@ -876,8 +886,10 @@ plugin.tx_femanager {
876886
cc.value =
877887

878888
# Set reply to receivers (comma separated list for multiple reply to receivers)
879-
replyTo = TEXT
880-
replyTo.value =
889+
#replyTo = TEXT
890+
#replyTo.value =
891+
# use reply to per default for the sender configuration
892+
replyTo < .sender.email
881893

882894
# Set mail priority from 1 to 5
883895
priority = TEXT
@@ -955,8 +967,10 @@ plugin.tx_femanager {
955967
cc.value =
956968

957969
# Set reply to receivers (comma separated list for multiple reply to receivers)
958-
replyTo = TEXT
959-
replyTo.value =
970+
#replyTo = TEXT
971+
#replyTo.value =
972+
# use reply to per default for the sender configuration
973+
replyTo < .sender.email
960974

961975
# Set mail priority from 1 to 5 (from important to not important)
962976
priority = TEXT
@@ -1034,8 +1048,10 @@ plugin.tx_femanager {
10341048
cc.value =
10351049

10361050
# Set reply to receivers (comma separated list for multiple reply to receivers)
1037-
replyTo = TEXT
1038-
replyTo.value =
1051+
#replyTo = TEXT
1052+
#replyTo.value =
1053+
# use reply to per default for the sender configuration
1054+
replyTo < .sender.email
10391055

10401056
# Set mail priority from 1 to 5 (from important to not important)
10411057
priority = TEXT
@@ -1236,8 +1252,10 @@ plugin.tx_femanager {
12361252
cc.value =
12371253

12381254
# Set reply to receivers (comma separated list for multiple reply to receivers)
1239-
replyTo = TEXT
1240-
replyTo.value =
1255+
#replyTo = TEXT
1256+
#replyTo.value =
1257+
# use reply to per default for the sender configuration
1258+
replyTo < .sender.email
12411259

12421260
# Set mail priority from 1 to 5
12431261
priority = TEXT
@@ -1315,8 +1333,10 @@ plugin.tx_femanager {
13151333
cc.value =
13161334

13171335
# Set reply to receivers (comma separated list for multiple reply to receivers)
1318-
replyTo = TEXT
1319-
replyTo.value =
1336+
#replyTo = TEXT
1337+
#replyTo.value =
1338+
# use reply to per default for the sender configuration
1339+
replyTo < .sender.email
13201340

13211341
# Set mail priority from 1 to 5
13221342
priority = TEXT
@@ -1394,8 +1414,10 @@ plugin.tx_femanager {
13941414
cc.value =
13951415

13961416
# Set reply to receivers (comma separated list for multiple reply to receivers)
1397-
replyTo = TEXT
1398-
replyTo.value =
1417+
#replyTo = TEXT
1418+
#replyTo.value =
1419+
# use reply to per default for the sender configuration
1420+
replyTo < .sender.email
13991421

14001422
# Set mail priority from 1 to 5
14011423
priority = TEXT
@@ -1473,8 +1495,10 @@ plugin.tx_femanager {
14731495
cc.value =
14741496

14751497
# Set reply to receivers (comma separated list for multiple reply to receivers)
1476-
replyTo = TEXT
1477-
replyTo.value =
1498+
#replyTo = TEXT
1499+
#replyTo.value =
1500+
# use reply to per default for the sender configuration
1501+
replyTo < .sender.email
14781502

14791503
# Set mail priority from 1 to 5
14801504
priority = TEXT

0 commit comments

Comments
 (0)