protected function sendEmail(Swift_Transport $transport, SpoolEmailInterface $email, &$failedRecipients)
    {
        $count = 0;

        try {
            if ($transport->send($email->getMessage(), $failedRecipients)) {
                $email->setStatus(SpoolEmailStatus::STATUS_SUCCESS);
                ++$count;
            } else {
                $email->setStatus(SpoolEmailStatus::STATUS_FAILED);
            }
        } catch (\Swift_TransportException $e) {
            $email->setStatus(SpoolEmailStatus::STATUS_FAILED);
            $email->setStatusMessage($e->getMessage());
        }

        return $count;
    }
protected function sendEmail(Swift_Transport $transport, SpoolEmailInterface $email, &$failedRecipients)
    {
        $count = 0;

        try {
            if ($transport->send($email->getMessage(), $failedRecipients)) {
                $email->setStatus(SpoolEmailStatus::STATUS_SUCCESS);
                ++$count;
            } else {
                $email->setStatus(SpoolEmailStatus::STATUS_FAILED);
            }
        } catch (\Swift_TransportException $e) {
            $email->setStatus(SpoolEmailStatus::STATUS_FAILED);
            $email->setStatusMessage($e->getMessage());
        }

        return $count;
    }
protected function sendEmail ( Swift_Transport $ transport , SpoolEmailInterface $ email , & $ failedRecipients ) { $ count = 0 ; try { if ( $ transport -> send ( $ email -> getMessage ( ) , $ failedRecipients ) ) { $ email -> setStatus ( SpoolEmailStatus :: STATUS_SUCCESS ) ; ++ $ count ; } else { $ email -> setStatus ( SpoolEmailStatus :: STATUS_FAILED ) ; } } catch ( \ Swift_TransportException $ e ) { $ email -> setStatus ( SpoolEmailStatus :: STATUS_FAILED ) ; $ email -> setStatusMessage ( $ e -> getMessage ( ) ) ; } return $ count ; }
Send the spool email.

@param Swift_Transport     $transport        The swiftmailer transport
@param SpoolEmailInterface $email            The spool email
@param null|string[]       $failedRecipients The failed recipients

@return int The count
Send the spool email .