[ Index ]

MailPress 7.2

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

title

Body

[close]

/mp-includes/composer/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/Esmtp/ -> SmtpUtf8Handler.php (source)

   1  <?php
   2  
   3  /*
   4   * This file is part of SwiftMailer.
   5   * (c) 2018 Christian Schmidt
   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   * An ESMTP handler for SMTPUTF8 support (RFC 6531).
  13   *
  14   * SMTPUTF8 is required when sending to email addresses containing non-ASCII
  15   * characters in local-part (the substring before @). This handler should be
  16   * used together with Swift_AddressEncoder_Utf8AddressEncoder.
  17   *
  18   * SMTPUTF8 mode is enabled unconditionally, even when sending to ASCII-only
  19   * addresses, so it should only be used with an outbound SMTP server that will
  20   * deliver ASCII-only messages even if the next hop does not support SMTPUTF8.
  21   *
  22   * @author Christian Schmidt
  23   */
  24  class Swift_Transport_Esmtp_SmtpUtf8Handler implements Swift_Transport_EsmtpHandler
  25  {
  26      public function __construct()
  27      {
  28      }
  29  
  30      /**
  31       * Get the name of the ESMTP extension this handles.
  32       *
  33       * @return string
  34       */
  35      public function getHandledKeyword()
  36      {
  37          return 'SMTPUTF8';
  38      }
  39  
  40      /**
  41       * Not used.
  42       */
  43      public function setKeywordParams(array $parameters)
  44      {
  45      }
  46  
  47      /**
  48       * Not used.
  49       */
  50      public function afterEhlo(Swift_Transport_SmtpAgent $agent)
  51      {
  52      }
  53  
  54      /**
  55       * Get params which are appended to MAIL FROM:<>.
  56       *
  57       * @return string[]
  58       */
  59      public function getMailParams()
  60      {
  61          return ['SMTPUTF8'];
  62      }
  63  
  64      /**
  65       * Not used.
  66       */
  67      public function getRcptParams()
  68      {
  69          return [];
  70      }
  71  
  72      /**
  73       * Not used.
  74       */
  75      public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = [], &$failedRecipients = null, &$stop = false)
  76      {
  77      }
  78  
  79      /**
  80       * Returns +1, -1 or 0 according to the rules for usort().
  81       *
  82       * This method is called to ensure extensions can be execute in an appropriate order.
  83       *
  84       * @param string $esmtpKeyword to compare with
  85       *
  86       * @return int
  87       */
  88      public function getPriorityOver($esmtpKeyword)
  89      {
  90          return 0;
  91      }
  92  
  93      /**
  94       * Not used.
  95       */
  96      public function exposeMixinMethods()
  97      {
  98          return [];
  99      }
 100  
 101      /**
 102       * Not used.
 103       */
 104      public function resetState()
 105      {
 106      }
 107  }


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