feat: send replies to assignment mailings to the travel management inbox
This commit is contained in:
1 parent
74080b0488
commit
2c51ddf86f
5 files changed
+13
-9
No files matched your search
@@ -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', [
|
||||
|
||||
Reference in new issue
Block a user