src/Control/Email/SwiftPlugin.php
public function beforeSendPerformed(\Swift_Events_SendEvent $evt)
    {
        /** @var \Swift_Message $message */
        $message = $evt->getMessage();

        $sendAllTo = Email::getSendAllEmailsTo();
        if (!empty($sendAllTo)) {
            $this->setTo($message, $sendAllTo);
        }

        $ccAllTo = Email::getCCAllEmailsTo();
        if (!empty($ccAllTo)) {
            foreach ($ccAllTo as $address => $name) {
                $message->addCc($address, $name);
            }
        }

        $bccAllTo = Email::getBCCAllEmailsTo();
        if (!empty($bccAllTo)) {
            foreach ($bccAllTo as $address => $name) {
                $message->addBcc($address, $name);
            }
        }

        $sendAllFrom = Email::getSendAllEmailsFrom();
        if (!empty($sendAllFrom)) {
            $this->setFrom($message, $sendAllFrom);
        }
    }
public function beforeSendPerformed(\Swift_Events_SendEvent $evt)
    {
        /** @var \Swift_Message $message */
        $message = $evt->getMessage();

        $sendAllTo = Email::getSendAllEmailsTo();
        if (!empty($sendAllTo)) {
            $this->setTo($message, $sendAllTo);
        }

        $ccAllTo = Email::getCCAllEmailsTo();
        if (!empty($ccAllTo)) {
            foreach ($ccAllTo as $address => $name) {
                $message->addCc($address, $name);
            }
        }

        $bccAllTo = Email::getBCCAllEmailsTo();
        if (!empty($bccAllTo)) {
            foreach ($bccAllTo as $address => $name) {
                $message->addBcc($address, $name);
            }
        }

        $sendAllFrom = Email::getSendAllEmailsFrom();
        if (!empty($sendAllFrom)) {
            $this->setFrom($message, $sendAllFrom);
        }
    }
public function beforeSendPerformed ( \ Swift_Events_SendEvent $ evt ) { /** @var \Swift_Message $message */ $ message = $ evt -> getMessage ( ) ; $ sendAllTo = Email :: getSendAllEmailsTo ( ) ; if ( ! empty ( $ sendAllTo ) ) { $ this -> setTo ( $ message , $ sendAllTo ) ; } $ ccAllTo = Email :: getCCAllEmailsTo ( ) ; if ( ! empty ( $ ccAllTo ) ) { foreach ( $ ccAllTo as $ address => $ name ) { $ message -> addCc ( $ address , $ name ) ; } } $ bccAllTo = Email :: getBCCAllEmailsTo ( ) ; if ( ! empty ( $ bccAllTo ) ) { foreach ( $ bccAllTo as $ address => $ name ) { $ message -> addBcc ( $ address , $ name ) ; } } $ sendAllFrom = Email :: getSendAllEmailsFrom ( ) ; if ( ! empty ( $ sendAllFrom ) ) { $ this -> setFrom ( $ message , $ sendAllFrom ) ; } }
Before sending a message make sure all our overrides are taken into account

@param \Swift_Events_SendEvent $evt
Before sending a message make sure all our overrides are taken into account