protected function prepareEmails(array $emails)
    {
        foreach ($emails as $email) {
            $email->setStatus(SpoolEmailStatus::STATUS_SENDING);
            $email->setSentAt(null);
            $this->om->persist($email);
        }

        $this->om->flush();
        reset($emails);

        return $emails;
    }
protected function prepareEmails(array $emails)
    {
        foreach ($emails as $email) {
            $email->setStatus(SpoolEmailStatus::STATUS_SENDING);
            $email->setSentAt(null);
            $this->om->persist($email);
        }

        $this->om->flush();
        reset($emails);

        return $emails;
    }
protected function prepareEmails ( array $ emails ) { foreach ( $ emails as $ email ) { $ email -> setStatus ( SpoolEmailStatus :: STATUS_SENDING ) ; $ email -> setSentAt ( null ) ; $ this -> om -> persist ( $ email ) ; } $ this -> om -> flush ( ) ; reset ( $ emails ) ; return $ emails ; }
Prepare the spool emails.

@param SpoolEmailInterface[] $emails The spool emails

@return SpoolEmailInterface[]
Prepare the spool emails .