Swift_Events_SendEvent::getFailedRecipients PHP Метод

getFailedRecipients() публичный Метод

Get an recipient addresses which were not accepted for delivery.
public getFailedRecipients ( ) : string[]
Результат string[]
    public function getFailedRecipients()
    {
        return $this->_failedRecipients;
    }

Usage Example

Пример #1
0
 /**
  * Part of the interface which is notified when a message has been sent.
  * @param Swift_Events_SendEvent
  */
 public function sendPerformed(Swift_Events_SendEvent $e)
 {
     $recipients = $e->getRecipients();
     $failed = $e->getFailedRecipients();
     $it = $recipients->getIterator("to");
     while ($it->hasNext()) {
         $it->next();
         $address = $it->getValue();
         $pass = !in_array($address->getAddress(), $failed);
         $this->getView()->paintResult($address->getAddress(), $pass);
     }
     $it = $recipients->getIterator("cc");
     while ($it->hasNext()) {
         $it->next();
         $address = $it->getValue();
         $pass = !in_array($address->getAddress(), $failed);
         $this->getView()->paintResult($address->getAddress(), $pass);
     }
     $it = $recipients->getIterator("bcc");
     while ($it->hasNext()) {
         $it->next();
         $address = $it->getValue();
         $pass = !in_array($address->getAddress(), $failed);
         $this->getView()->paintResult($address->getAddress(), $pass);
     }
 }
All Usage Examples Of Swift_Events_SendEvent::getFailedRecipients