PHP Class Swift_Transport_EsmtpTransport

Author: Chris Corbyn
Inheritance: extends Swift_Transport_AbstractSmtpTransport, implements Swift_Transport_SmtpAgent
Afficher le fichier Open project: swiftmailer/swiftmailer Class Usage Examples

Méthodes publiques

Méthode Description
__call ( $method, $args ) Mixin handling method for ESMTP handlers
__construct ( Swift_Transport_IoBuffer $buf, array $extensionHandlers, Swift_Events_EventDispatcher $dispatcher ) Creates a new EsmtpTransport using the given I/O buffer.
executeCommand ( string $command, int[] $codes = [], string[] &$failures = null ) : string Run a command against the buffer, expecting the given response codes.
getEncryption ( ) : string Get the encryption type.
getExtensionHandlers ( ) : Swift_Transport_EsmtpHandler[] Get ESMTP extension handlers.
getHost ( ) : string Get the host to connect to.
getPort ( ) : integer Get the port to connect to.
getSourceIp ( ) : string Returns the IP used to connect to the destination.
getStreamOptions ( ) : array Returns the stream context options.
getTimeout ( ) : integer Get the connection timeout.
setEncryption ( string $encryption ) : Swift_Transport_EsmtpTransport Set the encryption type (tls or ssl).
setExtensionHandlers ( array $handlers ) : Swift_Transport_EsmtpTransport Set ESMTP extension handlers.
setHost ( string $host ) : Swift_Transport_EsmtpTransport Set the host to connect to.
setPort ( integer $port ) : Swift_Transport_EsmtpTransport Set the port to connect to.
setSourceIp ( string $source ) : Swift_Transport_EsmtpTransport Sets the source IP.
setStreamOptions ( array $options ) : Swift_Transport_EsmtpTransport Sets the stream context options.
setTimeout ( integer $timeout ) : Swift_Transport_EsmtpTransport Set the connection timeout.

Méthodes protégées

Méthode Description
doHeloCommand ( ) Overridden to perform EHLO instead
doMailFromCommand ( $address ) Overridden to add Extension support
doRcptToCommand ( $address ) Overridden to add Extension support
getBufferParams ( ) Get the params to initialize the buffer

Private Methods

Méthode Description
getActiveHandlers ( ) Get ESMTP handlers which are currently ok to use
getCapabilities ( $ehloResponse ) Determine ESMTP capabilities by function group
setHandlerParams ( ) Set parameters which are used by each extension handler

Method Details

__call() public méthode

Mixin handling method for ESMTP handlers
public __call ( $method, $args )

__construct() public méthode

Creates a new EsmtpTransport using the given I/O buffer.
public __construct ( Swift_Transport_IoBuffer $buf, array $extensionHandlers, Swift_Events_EventDispatcher $dispatcher )
$buf Swift_Transport_IoBuffer
$extensionHandlers array
$dispatcher Swift_Events_EventDispatcher

doHeloCommand() protected méthode

Overridden to perform EHLO instead
protected doHeloCommand ( )

doMailFromCommand() protected méthode

Overridden to add Extension support
protected doMailFromCommand ( $address )

doRcptToCommand() protected méthode

Overridden to add Extension support
protected doRcptToCommand ( $address )

executeCommand() public méthode

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.
public executeCommand ( string $command, int[] $codes = [], string[] &$failures = null ) : string
$command string
$codes int[]
$failures string[] An array of failures by-reference
Résultat string

getBufferParams() protected méthode

Get the params to initialize the buffer
protected getBufferParams ( )

getEncryption() public méthode

Get the encryption type.
public getEncryption ( ) : string
Résultat string

getExtensionHandlers() public méthode

Get ESMTP extension handlers.
public getExtensionHandlers ( ) : Swift_Transport_EsmtpHandler[]
Résultat Swift_Transport_EsmtpHandler[]

getHost() public méthode

Get the host to connect to.
public getHost ( ) : string
Résultat string

getPort() public méthode

Get the port to connect to.
public getPort ( ) : integer
Résultat integer

getSourceIp() public méthode

Returns the IP used to connect to the destination.
public getSourceIp ( ) : string
Résultat string

getStreamOptions() public méthode

Returns the stream context options.
public getStreamOptions ( ) : array
Résultat array

getTimeout() public méthode

Get the connection timeout.
public getTimeout ( ) : integer
Résultat integer

setEncryption() public méthode

Set the encryption type (tls or ssl).
public setEncryption ( string $encryption ) : Swift_Transport_EsmtpTransport
$encryption string
Résultat Swift_Transport_EsmtpTransport

setExtensionHandlers() public méthode

Set ESMTP extension handlers.
public setExtensionHandlers ( array $handlers ) : Swift_Transport_EsmtpTransport
$handlers array
Résultat Swift_Transport_EsmtpTransport

setHost() public méthode

Set the host to connect to.
public setHost ( string $host ) : Swift_Transport_EsmtpTransport
$host string
Résultat Swift_Transport_EsmtpTransport

setPort() public méthode

Set the port to connect to.
public setPort ( integer $port ) : Swift_Transport_EsmtpTransport
$port integer
Résultat Swift_Transport_EsmtpTransport

setSourceIp() public méthode

Sets the source IP.
public setSourceIp ( string $source ) : Swift_Transport_EsmtpTransport
$source string
Résultat Swift_Transport_EsmtpTransport

setStreamOptions() public méthode

Sets the stream context options.
public setStreamOptions ( array $options ) : Swift_Transport_EsmtpTransport
$options array
Résultat Swift_Transport_EsmtpTransport

setTimeout() public méthode

Set the connection timeout.
public setTimeout ( integer $timeout ) : Swift_Transport_EsmtpTransport
$timeout integer seconds
Résultat Swift_Transport_EsmtpTransport