\Swift_SmtpTransport
Sends Messages over SMTP with ESMTP support.
- Author: Chris Corbyn
Synopsis
class Swift_SmtpTransport
extends Swift_Transport_EsmtpTransport
{
- // Inherited members from Swift_Transport_AbstractSmtpTransport
- protected $_buffer;
- protected $_started;
- protected string $_domain;
- protected $_eventDispatcher;
- protected $_sourceIp;
- // methods
- public void __construct()
- public static Swift_SmtpTransport newInstance()
- // Inherited methods from Swift_Transport_EsmtpTransport
- public void __construct()
- public Swift_Transport_EsmtpTransport setHost()
- public string getHost()
- public Swift_Transport_EsmtpTransport setPort()
- public int getPort()
- public Swift_Transport_EsmtpTransport setTimeout()
- public int getTimeout()
- public Swift_Transport_EsmtpTransport setEncryption()
- public string getEncryption()
- public Swift_Transport_EsmtpTransport setSourceIp()
- public string getSourceIp()
- public Swift_Transport_EsmtpTransport setExtensionHandlers()
- public array getExtensionHandlers()
- public string executeCommand()
- public void __call()
- protected void _getBufferParams()
- protected void _doHeloCommand()
- protected void _doMailFromCommand()
- protected void _doRcptToCommand()
- // Inherited methods from Swift_Transport_AbstractSmtpTransport
- protected abstract void _getBufferParams()
- public void __construct()
- public Swift_Transport_AbstractSmtpTransport setLocalDomain()
- public string getLocalDomain()
- public void setSourceIp()
- public string getSourceIp()
- public void start()
- public boolean isStarted()
- public int send()
- public void stop()
- public void registerPlugin()
- public void reset()
- public Swift_Transport_IoBuffer getBuffer()
- public string executeCommand()
- protected void _readGreeting()
- protected void _doHeloCommand()
- protected void _doMailFromCommand()
- protected void _doRcptToCommand()
- protected void _doDataCommand()
- protected void _streamMessage()
- protected void _getReversePath()
- protected void _throwException()
- protected void _assertResponseCode()
- protected void _getFullResponse()
- public void __destruct()
Hierarchy
Extends
Members
protected
-
$_buffer
Input-Output buffer for sending/receiving SMTP commands and responses -
$_domain
The domain name to use in HELO command -
$_eventDispatcher
The event dispatching layer -
$_sourceIp
Source Ip -
$_started
Connection status
Methods
public
- __construct() — Create a new SmtpTransport, optionally with $host, $port and $security.
- newInstance() — Create a new SmtpTransport instance.
Inherited from Swift_Transport_EsmtpTransport
protected
- _doHeloCommand() — Overridden to perform EHLO instead
- _doMailFromCommand() — Overridden to add Extension support
- _doRcptToCommand() — Overridden to add Extension support
- _getBufferParams() — Get the params to initialize the buffer
public
- __call() — Mixin handling method for ESMTP handlers
- executeCommand() — Run a command against the buffer, expecting the given response codes.
- getEncryption() — Get the encryption type.
- getExtensionHandlers() — Get ESMTP extension handlers.
- getHost() — Get the host to connect to.
- getPort() — Get the port to connect to.
- getSourceIp() — Returns the IP used to connect to the destination.
- getTimeout() — Get the connection timeout.
- setEncryption() — Set the encryption type (tls or ssl)
- setExtensionHandlers() — Set ESMTP extension handlers.
- setHost() — Set the host to connect to.
- setPort() — Set the port to connect to.
- setSourceIp() — Sets the source IP.
- setTimeout() — Set the connection timeout.
Inherited from Swift_Transport_AbstractSmtpTransport
protected
- _assertResponseCode() — Throws an Exception if a response code is incorrect
- _doDataCommand() — Send the DATA command
- _doHeloCommand() — Send the HELO welcome
- _doMailFromCommand() — Send the MAIL FROM command
- _doRcptToCommand() — Send the RCPT TO command
- _getBufferParams() — Return an array of params for the Buffer
- _getFullResponse() — Get an entire multi-line response using its sequence number
- _getReversePath() — Determine the best-use reverse path for this message
- _readGreeting() — Read the opening SMTP greeting
- _streamMessage() — Stream the contents of the message over the buffer
- _throwException() — Throw a TransportException, first sending it to any listeners
public
- executeCommand() — Run a command against the buffer, expecting the given response codes.
- getBuffer() — Get the IoBuffer where read/writes are occurring.
- getLocalDomain() — Get the name of the domain Swift will identify as.
- getSourceIp() — Returns the IP used to connect to the destination
- isStarted() — Test if an SMTP connection has been established.
- registerPlugin() — Register a plugin.
- reset() — Reset the current mail transaction.
- send() — Send the given Message.
- setLocalDomain() — Set the name of the local domain which Swift will identify itself as.
- setSourceIp() — Sets the source IP.
- start() — Start the SMTP connection.
- stop() — Stop the SMTP connection.