PHP 클래스 Swift_Transport_AbstractSmtpTransport, Halite

저자: Chris Corbyn
상속: implements Swift_Transport
파일 보기 프로젝트 열기: HaliteChallenge/Halite 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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