TYPO3  7.6
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
Swift_Transport_EsmtpTransport Class Reference
Inheritance diagram for Swift_Transport_EsmtpTransport:
Swift_Transport_AbstractSmtpTransport Swift_Transport_SmtpAgent Swift_Transport Swift_SmtpTransport

Public Member Functions

 __construct (Swift_Transport_IoBuffer $buf, array $extensionHandlers, Swift_Events_EventDispatcher $dispatcher)
 
 setHost ($host)
 
 getHost ()
 
 setPort ($port)
 
 getPort ()
 
 setTimeout ($timeout)
 
 getTimeout ()
 
 setEncryption ($encryption)
 
 getEncryption ()
 
 setSourceIp ($source)
 
 getSourceIp ()
 
 setExtensionHandlers (array $handlers)
 
 getExtensionHandlers ()
 
 executeCommand ($command, $codes=array(), &$failures=null)
 
 __call ($method, $args)
 
- Public Member Functions inherited from Swift_Transport_AbstractSmtpTransport
 __construct (Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher)
 
 setLocalDomain ($domain)
 
 getLocalDomain ()
 
 setSourceIp ($source)
 
 getSourceIp ()
 
 start ()
 
 isStarted ()
 
 send (Swift_Mime_Message $message, &$failedRecipients=null)
 
 stop ()
 
 registerPlugin (Swift_Events_EventListener $plugin)
 
 reset ()
 
 getBuffer ()
 
 executeCommand ($command, $codes=array(), &$failures=null)
 
 __destruct ()
 
- Public Member Functions inherited from Swift_Transport_SmtpAgent
 getBuffer ()
 

Protected Member Functions

 _getBufferParams ()
 
 _doHeloCommand ()
 
 _doMailFromCommand ($address)
 
 _doRcptToCommand ($address)
 
- Protected Member Functions inherited from Swift_Transport_AbstractSmtpTransport
 _getBufferParams ()
 
 _readGreeting ()
 
 _doHeloCommand ()
 
 _doMailFromCommand ($address)
 
 _doRcptToCommand ($address)
 
 _doDataCommand ()
 
 _streamMessage (Swift_Mime_Message $message)
 
 _getReversePath (Swift_Mime_Message $message)
 
 _throwException (Swift_TransportException $e)
 
 _assertResponseCode ($response, $wanted)
 
 _getFullResponse ($seq)
 

Private Member Functions

 _getCapabilities ($ehloResponse)
 
 _setHandlerParams ()
 
 _getActiveHandlers ()
 
 _sortHandlers ($a, $b)
 

Private Attributes

 $_handlers = array()
 
 $_capabilities = array()
 
 $_params
 

Additional Inherited Members

- Protected Attributes inherited from Swift_Transport_AbstractSmtpTransport
 $_buffer
 
 $_started = false
 
 $_domain = '[127.0.0.1]'
 
 $_eventDispatcher
 
 $_sourceIp
 

Detailed Description

Sends Messages over SMTP with ESMTP support.

Author
Chris Corbyn

Definition at line 16 of file EsmtpTransport.php.

Constructor & Destructor Documentation

__construct ( Swift_Transport_IoBuffer  $buf,
array  $extensionHandlers,
Swift_Events_EventDispatcher  $dispatcher 
)

Creates a new EsmtpTransport using the given I/O buffer.

Parameters
Swift_Transport_IoBuffer$buf
Swift_Transport_EsmtpHandler[]$extensionHandlers
Swift_Events_EventDispatcher$dispatcher

Definition at line 54 of file EsmtpTransport.php.

References setExtensionHandlers().

Member Function Documentation

__call (   $method,
  $args 
)

Mixin handling method for ESMTP handlers

Definition at line 249 of file EsmtpTransport.php.

_doHeloCommand ( )
protected
_doMailFromCommand (   $address)
protected

Overridden to add Extension support

Definition at line 312 of file EsmtpTransport.php.

References _getActiveHandlers(), and executeCommand().

_doRcptToCommand (   $address)
protected

Overridden to add Extension support

Definition at line 326 of file EsmtpTransport.php.

References _getActiveHandlers(), and executeCommand().

_getActiveHandlers ( )
private

Get ESMTP handlers which are currently ok to use

Definition at line 369 of file EsmtpTransport.php.

Referenced by _doHeloCommand(), _doMailFromCommand(), _doRcptToCommand(), and executeCommand().

_getBufferParams ( )
protected

Get the params to initialize the buffer

Definition at line 268 of file EsmtpTransport.php.

References $_params.

_getCapabilities (   $ehloResponse)
private

Determine ESMTP capabilities by function group

Definition at line 340 of file EsmtpTransport.php.

Referenced by _doHeloCommand().

_setHandlerParams ( )
private

Set parameters which are used by each extension handler

Definition at line 359 of file EsmtpTransport.php.

Referenced by _doHeloCommand(), and setExtensionHandlers().

_sortHandlers (   $a,
  $b 
)
private

Custom sort for extension handler ordering

Definition at line 382 of file EsmtpTransport.php.

executeCommand (   $command,
  $codes = array(),
$failures = null 
)

Run a command against the buffer, expecting the given response codes.

If no response codes are given, the response will not be validated. If codes are given, an exception will be thrown on an invalid response.

Parameters
string$command
int[]$codes
string[]$failures An array of failures by-reference
Returns
string

Implements Swift_Transport_SmtpAgent.

Definition at line 229 of file EsmtpTransport.php.

References $response, and _getActiveHandlers().

Referenced by _doHeloCommand(), _doMailFromCommand(), and _doRcptToCommand().

getEncryption ( )

Get the encryption type.

Returns
string

Definition at line 158 of file EsmtpTransport.php.

getExtensionHandlers ( )

Get ESMTP extension handlers.

Returns
Swift_Transport_EsmtpHandler[]

Definition at line 212 of file EsmtpTransport.php.

getHost ( )

Get the host to connect to.

Returns
string

Definition at line 79 of file EsmtpTransport.php.

getPort ( )

Get the port to connect to.

Returns
int

Definition at line 103 of file EsmtpTransport.php.

getSourceIp ( )

Returns the IP used to connect to the destination.

Returns
string

Definition at line 182 of file EsmtpTransport.php.

getTimeout ( )

Get the connection timeout.

Returns
int

Definition at line 128 of file EsmtpTransport.php.

setEncryption (   $encryption)

Set the encryption type (tls or ssl).

Parameters
string$encryption
Returns
Swift_Transport_EsmtpTransport

Definition at line 140 of file EsmtpTransport.php.

Referenced by Swift_SmtpTransport\__construct().

setExtensionHandlers ( array  $handlers)

Set ESMTP extension handlers.

Parameters
Swift_Transport_EsmtpHandler[]$handlers
Returns
Swift_Transport_EsmtpTransport

Definition at line 194 of file EsmtpTransport.php.

References _setHandlerParams().

Referenced by __construct().

setHost (   $host)

Set the host to connect to.

Parameters
string$host
Returns
Swift_Transport_EsmtpTransport

Definition at line 67 of file EsmtpTransport.php.

Referenced by Swift_SmtpTransport\__construct().

setPort (   $port)

Set the port to connect to.

Parameters
int$port
Returns
Swift_Transport_EsmtpTransport

Definition at line 91 of file EsmtpTransport.php.

Referenced by Swift_SmtpTransport\__construct().

setSourceIp (   $source)

Sets the source IP.

Parameters
string$source
Returns
Swift_Transport_EsmtpTransport

Definition at line 170 of file EsmtpTransport.php.

setTimeout (   $timeout)

Set the connection timeout.

Parameters
int$timeoutseconds
Returns
Swift_Transport_EsmtpTransport

Definition at line 115 of file EsmtpTransport.php.

Member Data Documentation

$_capabilities = array()
private

Definition at line 30 of file EsmtpTransport.php.

$_handlers = array()
private

Definition at line 23 of file EsmtpTransport.php.

$_params
private
Initial value:
= array(
'protocol' => 'tcp',
'host' => 'localhost',
'port' => 25,
'timeout' => 30,
'blocking' => 1,
'tls' => false,
)

Definition at line 37 of file EsmtpTransport.php.

Referenced by _getBufferParams().