Skip to content

Commit

Permalink
[FEATURE] Added information about cc and bcc recipients to intercepte…
Browse files Browse the repository at this point in the history
…d mail subjects
  • Loading branch information
bweinzierl committed Mar 11, 2020
1 parent 9267be9 commit 169e1c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Classes/Aspect/DebuggingAspect.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,10 @@ public function interceptEmails(\Neos\Flow\Aop\JoinPointInterface $joinPoint) {

if ($this->settings['interceptAll']['active']) {
$oldTo = $message->getTo();
$message->setSubject('[intercepted '.key($oldTo).'] '.$message->getSubject());
$oldCc = $message->getCc();
$oldBcc = $message->getBcc();
$interceptedRecipients = key($oldTo) . ($oldCc ? ' CC: ' . key($oldCc) : '') . ($oldBcc ? ' BCC: ' . key($oldBcc) : '');
$message->setSubject('[intercepted '.$interceptedRecipients.'] '.$message->getSubject());

$message->setCc(array());
$message->setBcc(array());
Expand Down

0 comments on commit 169e1c6

Please sign in to comment.