vendor/swiftmailer/lib/classes/Swift/Transport/EsmtpHandler.php
changeset 0 7f95f8617b0b
equal deleted inserted replaced
-1:000000000000 0:7f95f8617b0b
       
     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 /**
       
    13  * An ESMTP handler.
       
    14  * @package Swift
       
    15  * @subpackage Transport
       
    16  * @author Chris Corbyn
       
    17  */
       
    18 interface Swift_Transport_EsmtpHandler
       
    19 {
       
    20   
       
    21   /**
       
    22    * Get the name of the ESMTP extension this handles.
       
    23    * @return boolean
       
    24    */
       
    25   public function getHandledKeyword();
       
    26   
       
    27   /**
       
    28    * Set the parameters which the EHLO greeting indicated.
       
    29    * @param string[] $parameters
       
    30    */
       
    31   public function setKeywordParams(array $parameters);
       
    32   
       
    33   /**
       
    34    * Runs immediately after a EHLO has been issued.
       
    35    * @param Swift_Transport_SmtpAgent $agent to read/write
       
    36    */
       
    37   public function afterEhlo(Swift_Transport_SmtpAgent $agent);
       
    38   
       
    39   /**
       
    40    * Get params which are appended to MAIL FROM:<>.
       
    41    * @return string[]
       
    42    */
       
    43   public function getMailParams();
       
    44   
       
    45   /**
       
    46    * Get params which are appended to RCPT TO:<>.
       
    47    * @return string[]
       
    48    */
       
    49   public function getRcptParams();
       
    50   
       
    51   /**
       
    52    * Runs when a command is due to be sent.
       
    53    * @param Swift_Transport_SmtpAgent $agent to read/write
       
    54    * @param string $command to send
       
    55    * @param int[] $codes expected in response
       
    56    * @param string[] &$failedRecipients
       
    57    * @param boolean &$stop to be set true if the command is now sent
       
    58    */
       
    59   public function onCommand(Swift_Transport_SmtpAgent $agent,
       
    60     $command, $codes = array(), &$failedRecipients = null, &$stop = false);
       
    61     
       
    62   /**
       
    63    * Returns +1, -1 or 0 according to the rules for usort().
       
    64    * This method is called to ensure extensions can be execute in an appropriate order.
       
    65    * @param string $esmtpKeyword to compare with
       
    66    * @return int
       
    67    */
       
    68   public function getPriorityOver($esmtpKeyword);
       
    69   
       
    70   /**
       
    71    * Returns an array of method names which are exposed to the Esmtp class.
       
    72    * @return string[]
       
    73    */
       
    74   public function exposeMixinMethods();
       
    75   
       
    76   /**
       
    77    * Tells this handler to clear any buffers and reset its state.
       
    78    */
       
    79   public function resetState();
       
    80   
       
    81 }