public function sendSeparateEmails(array $toAddresses, $subject, $body)
    {
        $failures = 0;
        $ccList = $this->getCcAddresses();

        foreach ($toAddresses as $address) {
            if (!$this->sendEmail($address, $ccList, $subject, $body)) {
                $failures++;
            }
        }
        return $failures;
    }
public function sendSeparateEmails(array $toAddresses, $subject, $body)
    {
        $failures = 0;
        $ccList = $this->getCcAddresses();

        foreach ($toAddresses as $address) {
            if (!$this->sendEmail($address, $ccList, $subject, $body)) {
                $failures++;
            }
        }
        return $failures;
    }
public function sendSeparateEmails ( array $ toAddresses , $ subject , $ body ) { $ failures = 0 ; $ ccList = $ this -> getCcAddresses ( ) ; foreach ( $ toAddresses as $ address ) { if ( ! $ this -> sendEmail ( $ address , $ ccList , $ subject , $ body ) ) { $ failures ++ ; } } return $ failures ; }
Send an email to a list of specified subjects.

@param array $toAddresses
List of destination addresses for message.
@param string $subject
Mail subject
@param string $body
Mail body

@return int number of failed messages
Send an email to a list of specified subjects .