XOOPS RMCommon Utilities  2.1.8.91RC
 All Classes Namespaces Files Functions Variables
Swift_Transport_AbstractSmtpTransport Class Reference
Inheritance diagram for Swift_Transport_AbstractSmtpTransport:
Inheritance graph

Public Member Functions

 __construct (Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher)
 
 __destruct ()
 
 executeCommand ($command, $codes=array(), &$failures=null)
 
 getBuffer ()
 
 getLocalDomain ()
 
 isStarted ()
 
 registerPlugin (Swift_Events_EventListener $plugin)
 
 reset ()
 
 send (Swift_Mime_Message $message, &$failedRecipients=null)
 
 setLocalDomain ($domain)
 
 start ()
 
 stop ()
 

Protected Member Functions

 _assertResponseCode ($response, $wanted)
 
 _doDataCommand ()
 
 _doHeloCommand ()
 
 _doMailFromCommand ($address)
 
 _doRcptToCommand ($address)
 
 _getBufferParams ()
 
 _getFullResponse ($seq)
 
 _getReversePath (Swift_Mime_Message $message)
 
 _readGreeting ()
 
 _streamMessage (Swift_Mime_Message $message)
 
 _throwException (Swift_TransportException $e)
 

Protected Attributes

 $_buffer
 
 $_domain = '[127.0.0.1]'
 
 $_eventDispatcher
 
 $_started = false
 

Private Member Functions

 _doMailTransaction ($message, $reversePath, array $recipients, array &$failedRecipients)
 
 _isFqdn ($hostname)
 
 _lookupHostname ()
 
 _sendBcc (Swift_Mime_Message $message, $reversePath, array $bcc, array &$failedRecipients)
 
 _sendCc (Swift_Mime_Message $message, $reversePath, array $cc, array &$failedRecipients)
 
 _sendTo (Swift_Mime_Message $message, $reversePath, array $to, array &$failedRecipients)
 

Detailed Description

Definition at line 26 of file AbstractSmtpTransport.php.

Constructor & Destructor Documentation

Swift_Transport_AbstractSmtpTransport::__construct ( Swift_Transport_IoBuffer  $buf,
Swift_Events_EventDispatcher  $dispatcher 
)

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

Parameters
Swift_Transport_IoBuffer$buf
Swift_Events_EventDispatcher$dispatcher

Definition at line 51 of file AbstractSmtpTransport.php.

References _lookupHostname().

Here is the call graph for this function:

Swift_Transport_AbstractSmtpTransport::__destruct ( )

Destructor.

Definition at line 538 of file AbstractSmtpTransport.php.

References stop().

Here is the call graph for this function:

Member Function Documentation

Swift_Transport_AbstractSmtpTransport::_assertResponseCode (   $response,
  $wanted 
)
protected

Throws an Exception if a response code is incorrect

Definition at line 392 of file AbstractSmtpTransport.php.

References _throwException().

Referenced by _readGreeting(), and executeCommand().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_doDataCommand ( )
protected

Send the DATA command

Definition at line 327 of file AbstractSmtpTransport.php.

References executeCommand().

Referenced by _doMailTransaction().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_doHeloCommand ( )
protected

Send the HELO welcome

Definition at line 303 of file AbstractSmtpTransport.php.

References executeCommand().

Referenced by start().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_doMailFromCommand (   $address)
protected

Send the MAIL FROM command

Definition at line 311 of file AbstractSmtpTransport.php.

References executeCommand().

Referenced by _doMailTransaction().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_doMailTransaction (   $message,
  $reversePath,
array  $recipients,
array &  $failedRecipients 
)
private

Send an email to the given recipients from the given reverse path

Definition at line 437 of file AbstractSmtpTransport.php.

References _doDataCommand(), _doMailFromCommand(), _doRcptToCommand(), _streamMessage(), and reset().

Referenced by _sendBcc(), _sendCc(), and _sendTo().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_doRcptToCommand (   $address)
protected

Send the RCPT TO command

Definition at line 319 of file AbstractSmtpTransport.php.

References executeCommand().

Referenced by _doMailTransaction().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_getBufferParams ( )
abstractprotected

Return an array of params for the Buffer

Referenced by start().

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_getFullResponse (   $seq)
protected

Get an entire multi-line response using its sequence number

Definition at line 415 of file AbstractSmtpTransport.php.

References _throwException().

Referenced by _readGreeting(), and executeCommand().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_getReversePath ( Swift_Mime_Message  $message)
protected

Determine the best-use reverse path for this message

Definition at line 350 of file AbstractSmtpTransport.php.

References $from, $path, elseif(), Swift_Mime_Message\getFrom(), Swift_Mime_Message\getReturnPath(), Swift_Mime_Message\getSender(), and reset().

Referenced by Swift_Transport_SendmailTransport\send(), and send().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_isFqdn (   $hostname)
private

Determine is the $hostname is a fully-qualified name

Definition at line 522 of file AbstractSmtpTransport.php.

Referenced by _lookupHostname().

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_lookupHostname ( )
private

Try to determine the hostname of the server this is run on

Definition at line 508 of file AbstractSmtpTransport.php.

References _isFqdn(), and elseif().

Referenced by __construct().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_readGreeting ( )
protected

Read the opening SMTP greeting

Definition at line 297 of file AbstractSmtpTransport.php.

References _assertResponseCode(), and _getFullResponse().

Referenced by start().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_sendBcc ( Swift_Mime_Message  $message,
  $reversePath,
array  $bcc,
array &  $failedRecipients 
)
private

Send a message to all Bcc: recipients

Definition at line 493 of file AbstractSmtpTransport.php.

References _doMailTransaction(), and Swift_Mime_Message\setBcc().

Referenced by send().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_sendCc ( Swift_Mime_Message  $message,
  $reversePath,
array  $cc,
array &  $failedRecipients 
)
private

Send a message to the given Cc: recipients

Definition at line 481 of file AbstractSmtpTransport.php.

References _doMailTransaction().

Referenced by send().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_sendTo ( Swift_Mime_Message  $message,
  $reversePath,
array  $to,
array &  $failedRecipients 
)
private

Send a message to the given To: recipients

Definition at line 469 of file AbstractSmtpTransport.php.

References _doMailTransaction().

Referenced by send().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_streamMessage ( Swift_Mime_Message  $message)
protected

Stream the contents of the message over the buffer

Definition at line 333 of file AbstractSmtpTransport.php.

References _throwException(), executeCommand(), and Swift_Mime_MimeEntity\toByteStream().

Referenced by _doMailTransaction().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::_throwException ( Swift_TransportException  $e)
protected

Throw a TransportException, first sending it to any listeners

Definition at line 375 of file AbstractSmtpTransport.php.

Referenced by _assertResponseCode(), _getFullResponse(), _streamMessage(), Swift_Transport_SendmailTransport\send(), start(), and stop().

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::executeCommand (   $command,
  $codes = array(),
$failures = null 
)

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.

Parameters
string$command
int[]$codes
string[]&$failures
Returns
string

Definition at line 281 of file AbstractSmtpTransport.php.

References _assertResponseCode(), and _getFullResponse().

Referenced by _doDataCommand(), _doHeloCommand(), _doMailFromCommand(), _doRcptToCommand(), _streamMessage(), reset(), and stop().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::getBuffer ( )

Get the IoBuffer where read/writes are occurring.

Returns
Swift_Transport_IoBuffer

Definition at line 265 of file AbstractSmtpTransport.php.

References $_buffer.

Referenced by Swift_Transport_SendmailTransport\send().

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::getLocalDomain ( )

Get the name of the domain Swift will identify as.

Returns
string

Definition at line 78 of file AbstractSmtpTransport.php.

References $_domain.

Swift_Transport_AbstractSmtpTransport::isStarted ( )

Test if an SMTP connection has been established.

Returns
boolean

Implements Swift_Transport.

Definition at line 124 of file AbstractSmtpTransport.php.

References $_started.

Swift_Transport_AbstractSmtpTransport::registerPlugin ( Swift_Events_EventListener  $plugin)

Register a plugin.

Parameters
Swift_Events_EventListener$plugin

Implements Swift_Transport.

Definition at line 247 of file AbstractSmtpTransport.php.

Swift_Transport_AbstractSmtpTransport::reset ( )

Reset the current mail transaction.

Definition at line 255 of file AbstractSmtpTransport.php.

References executeCommand().

Referenced by _doMailTransaction(), and _getReversePath().

Here is the call graph for this function:

Here is the caller graph for this function:

Swift_Transport_AbstractSmtpTransport::send ( Swift_Mime_Message  $message,
$failedRecipients = null 
)

Send the given Message.

Recipient/sender data will be retreived from the Message API. The return value is the number of recipients who were accepted for delivery.

Parameters
Swift_Mime_Message$message
string[]&$failedRecipients to collect failures by-reference
Returns
int

Implements Swift_Transport.

Definition at line 139 of file AbstractSmtpTransport.php.

References _getReversePath(), _sendBcc(), _sendCc(), _sendTo(), elseif(), Swift_Mime_Message\generateId(), Swift_Mime_Message\getBcc(), Swift_Mime_Message\getCc(), Swift_Mime_Message\getTo(), Swift_Events_SendEvent\RESULT_FAILED, Swift_Events_SendEvent\RESULT_SUCCESS, Swift_Events_SendEvent\RESULT_TENTATIVE, and Swift_Mime_Message\setBcc().

Here is the call graph for this function:

Swift_Transport_AbstractSmtpTransport::setLocalDomain (   $domain)

Set the name of the local domain which Swift will identify itself as. 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]).

Parameters
string$domain

Definition at line 67 of file AbstractSmtpTransport.php.

Swift_Transport_AbstractSmtpTransport::start ( )

Start the SMTP connection.

Implements Swift_Transport.

Definition at line 86 of file AbstractSmtpTransport.php.

References _doHeloCommand(), _getBufferParams(), _readGreeting(), and _throwException().

Here is the call graph for this function:

Swift_Transport_AbstractSmtpTransport::stop ( )

Stop the SMTP connection.

Implements Swift_Transport.

Definition at line 206 of file AbstractSmtpTransport.php.

References _throwException(), and executeCommand().

Referenced by __destruct().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Swift_Transport_AbstractSmtpTransport::$_buffer
protected

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

Definition at line 31 of file AbstractSmtpTransport.php.

Referenced by getBuffer().

Swift_Transport_AbstractSmtpTransport::$_domain = '[127.0.0.1]'
protected

The domain name to use in HELO command

Definition at line 37 of file AbstractSmtpTransport.php.

Referenced by getLocalDomain().

Swift_Transport_AbstractSmtpTransport::$_eventDispatcher
protected

The event dispatching layer

Definition at line 40 of file AbstractSmtpTransport.php.

Swift_Transport_AbstractSmtpTransport::$_started = false
protected

Connection status

Definition at line 34 of file AbstractSmtpTransport.php.

Referenced by isStarted().


The documentation for this class was generated from the following file: