[ Index ]

MailPress 7.2

[ Index ]     [ Classes ]     [ Functions ]     [ Variables ]     [ Constants ]     [ Statistics ]    

title

Body

[close]

/mp-includes/composer/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Plugins/Reporters/ -> HtmlReporter.php (source)

   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   * A HTML output reporter for the Reporter plugin.
  13   *
  14   * @author Chris Corbyn
  15   */
  16  class Swift_Plugins_Reporters_HtmlReporter implements Swift_Plugins_Reporter
  17  {
  18      /**
  19       * Notifies this ReportNotifier that $address failed or succeeded.
  20       *
  21       * @param string $address
  22       * @param int    $result  from {@see RESULT_PASS, RESULT_FAIL}
  23       */
  24      public function notify(Swift_Mime_SimpleMessage $message, $address, $result)
  25      {
  26          if (self::RESULT_PASS == $result) {
  27              echo '<div style="color: #fff; background: #006600; padding: 2px; margin: 2px;">'.PHP_EOL;
  28              echo 'PASS '.$address.PHP_EOL;
  29              echo '</div>'.PHP_EOL;
  30              flush();
  31          } else {
  32              echo '<div style="color: #fff; background: #880000; padding: 2px; margin: 2px;">'.PHP_EOL;
  33              echo 'FAIL '.$address.PHP_EOL;
  34              echo '</div>'.PHP_EOL;
  35              flush();
  36          }
  37      }
  38  }


Generated: Tue May 19 15:55:14 2020 Cross-referenced by PHPXref 0.7.1