PHP Класс Swift_Transport_AbstractSmtpTransport, Halite

Автор: Chris Corbyn
Наследование: implements Swift_Transport
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (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

Открытые методы

Метод Описание
__construct ( Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher ) Creates a new EsmtpTransport using the given I/O buffer.
__destruct ( ) Destructor.
executeCommand ( string $command, int[] $codes = [], string[] &$failures = null ) : string Run a command against the buffer, expecting the given response codes.
getBuffer ( ) : Swift_Transport_IoBuffer Get the IoBuffer where read/writes are occurring.
getLocalDomain ( ) : string Get the name of the domain Swift will identify as.
getSourceIp ( ) : string Returns the IP used to connect to the destination.
isStarted ( ) : boolean Test if an SMTP connection has been established.
registerPlugin ( Swift_Events_EventListener $plugin ) Register a plugin.
reset ( ) Reset the current mail transaction.
send ( Swift_Mime_Message $message, string[] &$failedRecipients = null ) : integer Send the given Message.
setLocalDomain ( string $domain ) : Swift_Transport_AbstractSmtpTransport Set the name of the local domain which Swift will identify itself as.
setSourceIp ( string $source ) Sets the source IP.
start ( ) Start the SMTP connection.
stop ( ) Stop the SMTP connection.

Защищенные методы

Метод Описание
_assertResponseCode ( $response, $wanted ) Throws an Exception if a response code is incorrect
_doDataCommand ( ) Send the DATA command
_doHeloCommand ( ) Send the HELO welcome
_doMailFromCommand ( $address ) Send the MAIL FROM command
_doRcptToCommand ( $address ) Send the RCPT TO command
_getBufferParams ( ) Return an array of params for the Buffer
_getFullResponse ( $seq ) Get an entire multi-line response using its sequence number
_getReversePath ( Swift_Mime_Message $message ) Determine the best-use reverse path for this message
_readGreeting ( ) Read the opening SMTP greeting
_streamMessage ( Swift_Mime_Message $message ) Stream the contents of the message over the buffer
_throwException ( Swift_TransportException $e ) Throw a TransportException, first sending it to any listeners

Приватные методы

Метод Описание
_doMailTransaction ( $message, $reversePath, array $recipients, array &$failedRecipients ) Send an email to the given recipients from the given reverse path
_isFqdn ( $hostname ) Determine is the $hostname is a fully-qualified name
_lookupHostname ( ) Try to determine the hostname of the server this is run on
_sendBcc ( Swift_Mime_Message $message, $reversePath, array $bcc, array &$failedRecipients ) Send a message to all Bcc: recipients
_sendTo ( Swift_Mime_Message $message, $reversePath, array $to, array &$failedRecipients ) Send a message to the given To: recipients

Описание методов

__construct() публичный метод

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

__destruct() публичный метод

Destructor.
public __destruct ( )

_assertResponseCode() защищенный метод

Throws an Exception if a response code is incorrect
protected _assertResponseCode ( $response, $wanted )

_doDataCommand() защищенный метод

Send the DATA command
protected _doDataCommand ( )

_doHeloCommand() защищенный метод

Send the HELO welcome
protected _doHeloCommand ( )

_doMailFromCommand() защищенный метод

Send the MAIL FROM command
protected _doMailFromCommand ( $address )

_doRcptToCommand() защищенный метод

Send the RCPT TO command
protected _doRcptToCommand ( $address )

_getBufferParams() абстрактный защищенный метод

Return an array of params for the Buffer
abstract protected _getBufferParams ( )

_getFullResponse() защищенный метод

Get an entire multi-line response using its sequence number
protected _getFullResponse ( $seq )

_getReversePath() защищенный метод

Determine the best-use reverse path for this message
protected _getReversePath ( Swift_Mime_Message $message )
$message Swift_Mime_Message

_readGreeting() защищенный метод

Read the opening SMTP greeting
protected _readGreeting ( )

_streamMessage() защищенный метод

Stream the contents of the message over the buffer
protected _streamMessage ( Swift_Mime_Message $message )
$message Swift_Mime_Message

_throwException() защищенный метод

Throw a TransportException, first sending it to any listeners
protected _throwException ( Swift_TransportException $e )
$e Swift_TransportException

executeCommand() публичный метод

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
Результат string

getBuffer() публичный метод

Get the IoBuffer where read/writes are occurring.
public getBuffer ( ) : Swift_Transport_IoBuffer
Результат Swift_Transport_IoBuffer

getLocalDomain() публичный метод

Get the name of the domain Swift will identify as.
public getLocalDomain ( ) : string
Результат string

getSourceIp() публичный метод

Returns the IP used to connect to the destination.
public getSourceIp ( ) : string
Результат string

isStarted() публичный метод

Test if an SMTP connection has been established.
public isStarted ( ) : boolean
Результат boolean

registerPlugin() публичный метод

Register a plugin.
public registerPlugin ( Swift_Events_EventListener $plugin )
$plugin Swift_Events_EventListener

reset() публичный метод

Reset the current mail transaction.
public reset ( )

send() публичный метод

Recipient/sender data will be retrieved from the Message API. The return value is the number of recipients who were accepted for delivery.
public send ( Swift_Mime_Message $message, string[] &$failedRecipients = null ) : integer
$message Swift_Mime_Message
$failedRecipients string[] An array of failures by-reference
Результат integer

setLocalDomain() публичный метод

This should be a fully-qualified domain name and should be truly the domain you're using. If your server doesn't have a domain name, use the IP in square brackets (i.e. [127.0.0.1]).
public setLocalDomain ( string $domain ) : Swift_Transport_AbstractSmtpTransport
$domain string
Результат Swift_Transport_AbstractSmtpTransport

setSourceIp() публичный метод

Sets the source IP.
public setSourceIp ( string $source )
$source string

start() публичный метод

Start the SMTP connection.
public start ( )

stop() публичный метод

Stop the SMTP connection.
public stop ( )

Описание свойств

$_buffer защищенное свойство

Input-Output buffer for sending/receiving SMTP commands and responses
protected $_buffer

$_domain защищенное свойство

The domain name to use in HELO command
protected $_domain

$_eventDispatcher защищенное свойство

The event dispatching layer
protected $_eventDispatcher

$_sourceIp защищенное свойство

Source Ip
protected $_sourceIp

$_started защищенное свойство

Connection status
protected $_started