Class Swift_Transport_EsmtpTransport

InheritanceSwift_Transport_EsmtpTransport » Swift_Transport_AbstractSmtpTransport
ImplementsSwift_Transport, Swift_Transport_SmtpAgent
SubclassesSwift_SmtpTransport

Sends Messages over SMTP with ESMTP support.

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$_buffer Input-Output buffer for sending/receiving SMTP commands and responses Swift_Transport_AbstractSmtpTransport
$_domain The domain name to use in HELO command Swift_Transport_AbstractSmtpTransport
$_eventDispatcher The event dispatching layer Swift_Transport_AbstractSmtpTransport
$_sourceIp Source Ip Swift_Transport_AbstractSmtpTransport
$_started Connection status Swift_Transport_AbstractSmtpTransport

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__call() Mixin handling method for ESMTP handlers Swift_Transport_EsmtpTransport
__construct() Creates a new EsmtpTransport using the given I/O buffer. Swift_Transport_EsmtpTransport
__destruct() Destructor. Swift_Transport_AbstractSmtpTransport
executeCommand() Run a command against the buffer, expecting the given response codes. Swift_Transport_EsmtpTransport
getBuffer() Get the IoBuffer where read/writes are occurring. Swift_Transport_AbstractSmtpTransport
getEncryption() Get the encryption type. Swift_Transport_EsmtpTransport
getExtensionHandlers() Get ESMTP extension handlers. Swift_Transport_EsmtpTransport
getHost() Get the host to connect to. Swift_Transport_EsmtpTransport
getLocalDomain() Get the name of the domain Swift will identify as. Swift_Transport_AbstractSmtpTransport
getPort() Get the port to connect to. Swift_Transport_EsmtpTransport
getSourceIp() Returns the IP used to connect to the destination. Swift_Transport_EsmtpTransport
getTimeout() Get the connection timeout. Swift_Transport_EsmtpTransport
isStarted() Test if an SMTP connection has been established. Swift_Transport_AbstractSmtpTransport
registerPlugin() Register a plugin. Swift_Transport_AbstractSmtpTransport
reset() Reset the current mail transaction. Swift_Transport_AbstractSmtpTransport
send() Send the given Message. Swift_Transport_AbstractSmtpTransport
setEncryption() Set the encryption type (tls or ssl). Swift_Transport_EsmtpTransport
setExtensionHandlers() Set ESMTP extension handlers. Swift_Transport_EsmtpTransport
setHost() Set the host to connect to. Swift_Transport_EsmtpTransport
setLocalDomain() Set the name of the local domain which Swift will identify itself as. Swift_Transport_AbstractSmtpTransport
setPort() Set the port to connect to. Swift_Transport_EsmtpTransport
setSourceIp() Sets the source IP. Swift_Transport_EsmtpTransport
setTimeout() Set the connection timeout. Swift_Transport_EsmtpTransport
start() Start the SMTP connection. Swift_Transport_AbstractSmtpTransport
stop() Stop the SMTP connection. Swift_Transport_AbstractSmtpTransport

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
_assertResponseCode() Throws an Exception if a response code is incorrect Swift_Transport_AbstractSmtpTransport
_doDataCommand() Send the DATA command Swift_Transport_AbstractSmtpTransport
_doHeloCommand() Overridden to perform EHLO instead Swift_Transport_EsmtpTransport
_doMailFromCommand() Overridden to add Extension support Swift_Transport_EsmtpTransport
_doRcptToCommand() Overridden to add Extension support Swift_Transport_EsmtpTransport
_getBufferParams() Get the params to initialize the buffer Swift_Transport_EsmtpTransport
_getFullResponse() Get an entire multi-line response using its sequence number Swift_Transport_AbstractSmtpTransport
_getReversePath() Determine the best-use reverse path for this message Swift_Transport_AbstractSmtpTransport
_readGreeting() Read the opening SMTP greeting Swift_Transport_AbstractSmtpTransport
_streamMessage() Stream the contents of the message over the buffer Swift_Transport_AbstractSmtpTransport
_throwException() Throw a TransportException, first sending it to any listeners Swift_Transport_AbstractSmtpTransport

Method Details

__call() public method

Mixin handling method for ESMTP handlers

public void __call ( $method, $args )
$method
$args
__construct() public method

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

public void __construct ( Swift_Transport_IoBuffer $buf, array $extensionHandlers, Swift_Events_EventDispatcher $dispatcher )
$buf Swift_Transport_IoBuffer
$extensionHandlers Swift_Transport_EsmtpHandler[]
$dispatcher Swift_Events_EventDispatcher
_doHeloCommand() protected method

Overridden to perform EHLO instead

protected void _doHeloCommand ( )
_doMailFromCommand() protected method

Overridden to add Extension support

protected void _doMailFromCommand ( $address )
$address
_doRcptToCommand() protected method

Overridden to add Extension support

protected void _doRcptToCommand ( $address )
$address
_getBufferParams() protected method

Get the params to initialize the buffer

protected void _getBufferParams ( )
executeCommand() public method

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.

public string executeCommand ( $command, $codes = [], <b>&</b>$failures null )
$command string
$codes int
$failures string[]

An array of failures by-reference

getEncryption() public method

Get the encryption type.

public string getEncryption ( )
getExtensionHandlers() public method

Get ESMTP extension handlers.

public Swift_Transport_EsmtpHandler[] getExtensionHandlers ( )
getHost() public method

Get the host to connect to.

public string getHost ( )
getPort() public method

Get the port to connect to.

public int getPort ( )
getSourceIp() public method

Returns the IP used to connect to the destination.

public string getSourceIp ( )
getTimeout() public method

Get the connection timeout.

public int getTimeout ( )
setEncryption() public method

Set the encryption type (tls or ssl).

public Swift_Transport_EsmtpTransport setEncryption ( $encryption )
$encryption string
setExtensionHandlers() public method

Set ESMTP extension handlers.

public Swift_Transport_EsmtpTransport setExtensionHandlers ( array $handlers )
$handlers Swift_Transport_EsmtpHandler[]
setHost() public method

Set the host to connect to.

public Swift_Transport_EsmtpTransport setHost ( $host )
$host string
setPort() public method

Set the port to connect to.

public Swift_Transport_EsmtpTransport setPort ( $port )
$port int
setSourceIp() public method

Sets the source IP.

public Swift_Transport_EsmtpTransport setSourceIp ( $source )
$source string
setTimeout() public method

Set the connection timeout.

public Swift_Transport_EsmtpTransport setTimeout ( $timeout )
$timeout int

Seconds