feat: send replies to assignment mailings to the travel management inbox

This commit is contained in:
fromme committed 2026-11-12 12:37:35 +01:00
1 parent 74080b0488
commit 2c51ddf86f
5 files changed
+13 -9

No files matched your search

+2 -2
View File
@@ -17,8 +17,8 @@ use App\Model\TeamerMailingRecipientsDto;
* finally sent, so a queued mailing never carries their content.
*
* With $listColleagues every mail ends with the names and addresses of the other recipients,
* taken from the same snapshot. $replyTo is the sender's address, kept here because the worker
* has no logged-in user to ask.
* taken from the same snapshot. $replyTo is decided when the mailing is queued, so a deploy
* that changes it does not reroute answers to a mailing already on its way.
*/
class SendTeamerMailing
{
@@ -26,6 +26,7 @@ class AssignmentMailingService
private readonly EntityManagerInterface $entityManager,
private readonly MessageBusInterface $messageBus,
private readonly LoggerInterface $logger,
private readonly string $assignmentMailingReplyTo,
) {
}
@@ -123,8 +124,8 @@ class AssignmentMailingService
$recipients,
$this->attachmentHandler->toMessageAttachments($attachments),
listColleagues: true,
// answers go to whoever wrote the mailing, not to the app's sender address
replyTo: $sender->getEmail()
// answers go to the travel management inbox, not to the app's sender address
replyTo: $this->assignmentMailingReplyTo
));
$this->logger->info('Send assignment mailing', [