/** * Prepare array of email address recipients * * @param Message $message * @return array */ protected function prepareRecipients(Message $message) { $recipients = array(); foreach ($message->to() as $address) { $recipients[] = $address->getEmail(); } foreach ($message->cc() as $address) { $recipients[] = $address->getEmail(); } foreach ($message->bcc() as $address) { $recipients[] = $address->getEmail(); } $recipients = array_unique($recipients); return $recipients; }