当前位置: 首页>>代码示例>>PHP>>正文


PHP Swift_Events_SendEvent::getFailedRecipients方法代码示例

本文整理汇总了PHP中Swift_Events_SendEvent::getFailedRecipients方法的典型用法代码示例。如果您正苦于以下问题:PHP Swift_Events_SendEvent::getFailedRecipients方法的具体用法?PHP Swift_Events_SendEvent::getFailedRecipients怎么用?PHP Swift_Events_SendEvent::getFailedRecipients使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Swift_Events_SendEvent的用法示例。


在下文中一共展示了Swift_Events_SendEvent::getFailedRecipients方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sendPerformed

 /**
  * 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);
     }
 }
开发者ID:auphau,项目名称:joyreactor,代码行数:30,代码来源:VerboseSending.php

示例2: sendPerformed

 /**
  * Invoked immediately after the Message is sent.
  *
  * @param \Swift_Events_SendEvent $evt
  */
 public function sendPerformed(\Swift_Events_SendEvent $evt)
 {
     $result = $evt->getResult();
     $failed_recipients = $evt->getFailedRecipients();
     $message = $evt->getMessage();
     if ($result === \Swift_Events_SendEvent::RESULT_SUCCESS) {
         $level = $this->levels['sendPerformed.SUCCESS'];
     } else {
         $level = $this->levels['sendPerformed.NOT_SUCCESS'];
     }
     $this->log($level, 'MESSAGE (sendPerformed): ', array('result' => $result, 'failed_recipients' => $failed_recipients, 'message' => $message->toString()));
 }
开发者ID:gcrico,项目名称:swift-mailer-psr-logger-plugin,代码行数:17,代码来源:SwiftMailerPsrLoggerPlugin.php

示例3: sendPerformed

 /**
  * Invoked immediately after the Message is sent.
  * @param Swift_Events_SendEvent $evt
  */
 public function sendPerformed(Swift_Events_SendEvent $event)
 {
     $this->logger->add(sprintf("Sent Emails, Failed Recipients: ", join(', ', $event->getFailedRecipients())));
 }
开发者ID:openbuildings,项目名称:html-email,代码行数:8,代码来源:Fullloggerplugin.php

示例4: sendPerformed

 /**
  * Invoked immediately after the Message is sent.
  * @param Swift_Events_SendEvent $evt
  */
 public function sendPerformed(Swift_Events_SendEvent $evt)
 {
   $message = $evt->getMessage();
   $failures = array_flip($evt->getFailedRecipients());
   foreach ((array) $message->getTo() as $address => $null)
   {
     $this->_reporter->notify(
       $message, $address, (array_key_exists($address, $failures)
       ? Swift_Plugins_Reporter::RESULT_FAIL
       : Swift_Plugins_Reporter::RESULT_PASS)
       );
   }
   foreach ((array) $message->getCc() as $address => $null)
   {
     $this->_reporter->notify(
       $message, $address, (array_key_exists($address, $failures)
       ? Swift_Plugins_Reporter::RESULT_FAIL
       : Swift_Plugins_Reporter::RESULT_PASS)
       );
   }
   foreach ((array) $message->getBcc() as $address => $null)
   {
     $this->_reporter->notify(
       $message, $address, (array_key_exists($address, $failures)
       ? Swift_Plugins_Reporter::RESULT_FAIL
       : Swift_Plugins_Reporter::RESULT_PASS)
       );
   }
 }
开发者ID:nationalfield,项目名称:symfony,代码行数:33,代码来源:ReporterPlugin.php


注:本文中的Swift_Events_SendEvent::getFailedRecipients方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。