Overview

Packages

  • CONTENIDO
  • Core
    • Authentication
    • Backend
    • Cache
    • CEC
    • Chain
    • ContentType
    • Database
    • Debug
    • Exception
    • Frontend
      • Search
      • URI
      • Util
    • GenericDB
      • Model
    • GUI
      • HTML
    • I18N
    • LayoutHandler
    • Log
    • Security
    • Session
    • Util
    • Validation
    • Versioning
    • XML
  • Module
    • ContentRssCreator
    • ContentSitemapHtml
    • ContentSitemapXml
    • ContentUserForum
    • NavigationTop
    • ScriptCookieDirective
  • mpAutoloaderClassMap
  • None
  • Plugin
    • ContentAllocation
    • CronjobOverview
    • FormAssistant
    • FrontendLogic
    • FrontendUsers
    • Linkchecker
    • ModRewrite
    • Newsletter
    • Repository
      • FrontendNavigation
      • KeywordDensity
    • SearchSolr
    • SmartyWrapper
    • UrlShortener
    • UserForum
    • Workflow
  • PluginManager
  • Setup
    • Form
    • GUI
    • Helper
      • Environment
      • Filesystem
      • MySQL
      • PHP
    • UpgradeJob
  • Smarty
    • Cacher
    • Compiler
    • Config
    • Debug
    • PluginsBlock
    • PluginsFilter
    • PluginsFunction
    • PluginsInternal
    • PluginsModifier
    • PluginsModifierCompiler
    • PluginsShared
    • Security
    • Template
    • TemplateResources
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift_FailoverTransport
  • Swift_LoadBalancedTransport
  • Swift_MailTransport
  • Swift_Plugins_Loggers_ArrayLogger
  • Swift_Plugins_Loggers_EchoLogger
  • Swift_SendmailTransport
  • Swift_SmtpTransport
  • Swift_Transport_AbstractSmtpTransport
  • Swift_Transport_Esmtp_Auth_CramMd5Authenticator
  • Swift_Transport_Esmtp_Auth_LoginAuthenticator
  • Swift_Transport_Esmtp_Auth_PlainAuthenticator
  • Swift_Transport_Esmtp_AuthHandler
  • Swift_Transport_EsmtpTransport
  • Swift_Transport_FailoverTransport
  • Swift_Transport_LoadBalancedTransport
  • Swift_Transport_MailTransport
  • Swift_Transport_SendmailTransport
  • Swift_Transport_SimpleMailInvoker
  • Swift_Transport_StreamBuffer

Interfaces

  • Swift_Plugins_Logger
  • Swift_Plugins_Pop_Pop3Exception
  • Swift_Transport
  • Swift_Transport_Esmtp_Authenticator
  • Swift_Transport_EsmtpHandler
  • Swift_Transport_IoBuffer
  • Swift_Transport_MailInvoker
  • Swift_Transport_SmtpAgent
  • Swift_TransportException
  • Overview
  • Package
  • Function
  • Todo
  • Download
 1: <?php
 2: 
 3: /*
 4:  * This file is part of SwiftMailer.
 5:  * (c) 2004-2009 Chris Corbyn
 6:  *
 7:  * For the full copyright and license information, please view the LICENSE
 8:  * file that was distributed with this source code.
 9:  */
10: 
11: /**
12:  * Does real time reporting of pass/fail for each recipient.
13:  * @package Swift
14:  * @subpackage Plugins
15:  * @author Chris Corbyn
16:  */
17: class Swift_Plugins_ReporterPlugin implements Swift_Events_SendListener
18: {
19:     /**
20:      * The reporter backend which takes notifications.
21:      * @var Swift_Plugin_Reporter
22:      * @access private
23:      */
24:     private $_reporter;
25: 
26:     /**
27:      * Create a new ReporterPlugin using $reporter.
28:      * @param Swift_Plugins_Reporter $reporter
29:      */
30:     public function __construct(Swift_Plugins_Reporter $reporter)
31:     {
32:         $this->_reporter = $reporter;
33:     }
34: 
35:     /**
36:      * Not used.
37:      */
38:     public function beforeSendPerformed(Swift_Events_SendEvent $evt)
39:     {
40:     }
41: 
42:     /**
43:      * Invoked immediately after the Message is sent.
44:      * @param Swift_Events_SendEvent $evt
45:      */
46:     public function sendPerformed(Swift_Events_SendEvent $evt)
47:     {
48:         $message = $evt->getMessage();
49:         $failures = array_flip($evt->getFailedRecipients());
50:         foreach ((array) $message->getTo() as $address => $null) {
51:             $this->_reporter->notify(
52:                 $message, $address, (array_key_exists($address, $failures)
53:                 ? Swift_Plugins_Reporter::RESULT_FAIL
54:                 : Swift_Plugins_Reporter::RESULT_PASS)
55:                 );
56:         }
57:         foreach ((array) $message->getCc() as $address => $null) {
58:             $this->_reporter->notify(
59:                 $message, $address, (array_key_exists($address, $failures)
60:                 ? Swift_Plugins_Reporter::RESULT_FAIL
61:                 : Swift_Plugins_Reporter::RESULT_PASS)
62:                 );
63:         }
64:         foreach ((array) $message->getBcc() as $address => $null) {
65:             $this->_reporter->notify(
66:                 $message, $address, (array_key_exists($address, $failures)
67:                 ? Swift_Plugins_Reporter::RESULT_FAIL
68:                 : Swift_Plugins_Reporter::RESULT_PASS)
69:                 );
70:         }
71:     }
72: }
73: 
CMS CONTENIDO 4.9.7 API documentation generated by ApiGen