protected function getToAddresses(Swift_Mime_SimpleMessage $message): array
    {
        $to = [];

        $getTo = $message->getTo();

        if (\is_array($getTo)) {
            $to = \array_merge($to, \array_keys($getTo));
        }

        $cc = $message->getCc();

        if (\is_array($cc)) {
            $to = \array_merge($to, \array_keys($cc));
        }

        $bcc = $message->getBcc();

        if (\is_array($bcc)) {
            $to = \array_merge($to, \array_keys($bcc));
        }

        return $to;
    }
protected function getToAddresses(Swift_Mime_SimpleMessage $message): array
    {
        $to = [];

        $getTo = $message->getTo();

        if (\is_array($getTo)) {
            $to = \array_merge($to, \array_keys($getTo));
        }

        $cc = $message->getCc();

        if (\is_array($cc)) {
            $to = \array_merge($to, \array_keys($cc));
        }

        $bcc = $message->getBcc();

        if (\is_array($bcc)) {
            $to = \array_merge($to, \array_keys($bcc));
        }

        return $to;
    }
protected function getToAddresses ( Swift_Mime_SimpleMessage $ message ) : array { $ to = [ ] ; $ getTo = $ message -> getTo ( ) ; if ( \ is_array ( $ getTo ) ) { $ to = \ array_merge ( $ to , \ array_keys ( $ getTo ) ) ; } $ cc = $ message -> getCc ( ) ; if ( \ is_array ( $ cc ) ) { $ to = \ array_merge ( $ to , \ array_keys ( $ cc ) ) ; } $ bcc = $ message -> getBcc ( ) ; if ( \ is_array ( $ bcc ) ) { $ to = \ array_merge ( $ to , \ array_keys ( $ bcc ) ) ; } return $ to ; }
Get all the addresses this email should be sent to,
including "to", "cc" and "bcc" addresses.

@param \Swift_Mime_SimpleMessage $message

@return array
Get all the addresses this email should be sent to including to cc and bcc addresses .