Swift
[ class tree: Swift ] [ index: Swift ] [ all elements ]

Class: Swift_Transport_AbstractSmtpTransport

Source Location: /vendors/swift/classes/Swift/Transport/AbstractSmtpTransport.php

Class Overview


Sends Messages over SMTP.


Author(s):

  • Chris Corbyn

Implements interfaces:

Variables

Methods


Child classes:

Swift_Transport_EsmtpTransport
Sends Messages over SMTP with ESMTP support.
Swift_Transport_SendmailTransport
SendmailTransport for sending mail through a sendmail/postfix (etc..) binary.

Class Details

[line 26]
Sends Messages over SMTP.



Tags:

author:  Chris Corbyn
abstract:  
filesource:  Source Code for this file


[ Top ]


Class Variables

$_buffer =

[line 31]

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



Tags:

access:  protected

Type:   mixed


[ Top ]

$_domain =  '[127.0.0.1]'

[line 37]

The domain name to use in HELO command



Tags:

access:  protected

Type:   mixed


[ Top ]

$_eventDispatcher =

[line 40]

The event dispatching layer



Tags:

access:  protected

Type:   mixed


[ Top ]

$_started =  false

[line 34]

Connection status



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 51]

Swift_Transport_AbstractSmtpTransport __construct( Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher)

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



Tags:

access:  public


Overridden in child classes as:

Swift_Transport_EsmtpTransport::__construct()
Creates a new EsmtpTransport using the given I/O buffer.
Swift_SmtpTransport::__construct()
Create a new SmtpTransport, optionally with $host, $port and $security.
Swift_Transport_SendmailTransport::__construct()
Create a new SendmailTransport with $buf for I/O.
Swift_SendmailTransport::__construct()
Create a new SendmailTransport, optionally using $command for sending.

Parameters:

Swift_Transport_IoBuffer   $buf  
Swift_Events_EventDispatcher   $dispatcher  

[ Top ]

destructor __destruct [line 538]

void __destruct( )

Destructor.



Tags:

access:  public


[ Top ]

method executeCommand [line 281]

string executeCommand( string $command, [int[] $codes = array()], [string[] &$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.




Tags:

access:  public


Overridden in child classes as:

Swift_Transport_EsmtpTransport::executeCommand()
Run a command against the buffer, expecting the given response codes.

Parameters:

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

[ Top ]

method getBuffer [line 265]

Swift_Transport_IoBuffer getBuffer( )

Get the IoBuffer where read/writes are occurring.



Tags:

access:  public


[ Top ]

method getLocalDomain [line 78]

string getLocalDomain( )

Get the name of the domain Swift will identify as.



Tags:

access:  public


[ Top ]

method isStarted [line 124]

boolean isStarted( )

Test if an SMTP connection has been established.



Tags:

access:  public



Implementation of:
Swift_Transport::isStarted()
Test if this Transport mechanism has started.
[ Top ]

method registerPlugin [line 247]

void registerPlugin( Swift_Events_EventListener $plugin)

Register a plugin.



Tags:

access:  public



Implementation of:
Swift_Transport::registerPlugin()
Register a plugin in the Transport.

Parameters:

Swift_Events_EventListener   $plugin  

[ Top ]

method reset [line 255]

void reset( )

Reset the current mail transaction.



Tags:

access:  public


[ Top ]

method send [line 139]

int send( Swift_Mime_Message $message, [string[] &$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.




Tags:

access:  public


Overridden in child classes as:

Swift_Transport_SendmailTransport::send()
Send the given Message.


Implementation of:
Swift_Transport::send()
Send the given Message.

Parameters:

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

[ Top ]

method setLocalDomain [line 67]

void setLocalDomain( string $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]).




Tags:

access:  public


Parameters:

string   $domain  

[ Top ]

method start [line 86]

void start( )

Start the SMTP connection.



Tags:

access:  public


Overridden in child classes as:

Swift_Transport_SendmailTransport::start()
Start the standalone SMTP session if running in -bs mode.


Implementation of:
Swift_Transport::start()
Start this Transport mechanism.
[ Top ]

method stop [line 206]

void stop( )

Stop the SMTP connection.



Tags:

access:  public



Implementation of:
Swift_Transport::stop()
Stop this Transport mechanism.
[ Top ]

method _assertResponseCode [line 392]

void _assertResponseCode( $response, $wanted)

Throws an Exception if a response code is incorrect



Tags:

access:  protected


Parameters:

   $response  
   $wanted  

[ Top ]

method _doDataCommand [line 327]

void _doDataCommand( )

Send the DATA command



Tags:

access:  protected


[ Top ]

method _doHeloCommand [line 303]

void _doHeloCommand( )

Send the HELO welcome



Tags:

access:  protected


Overridden in child classes as:

Swift_Transport_EsmtpTransport::_doHeloCommand()
Overridden to perform EHLO instead

[ Top ]

method _doMailFromCommand [line 311]

void _doMailFromCommand( $address)

Send the MAIL FROM command



Tags:

access:  protected


Overridden in child classes as:

Swift_Transport_EsmtpTransport::_doMailFromCommand()
Overridden to add Extension support

Parameters:

   $address  

[ Top ]

method _doRcptToCommand [line 319]

void _doRcptToCommand( $address)

Send the RCPT TO command



Tags:

access:  protected


Overridden in child classes as:

Swift_Transport_EsmtpTransport::_doRcptToCommand()
Overridden to add Extension support

Parameters:

   $address  

[ Top ]

method _getBufferParams [line 43]

void _getBufferParams( )

Return an array of params for the Buffer



Tags:

abstract:  
access:  protected


Overridden in child classes as:

Swift_Transport_EsmtpTransport::_getBufferParams()
Get the params to initialize the buffer
Swift_Transport_SendmailTransport::_getBufferParams()
Get the params to initialize the buffer

[ Top ]

method _getFullResponse [line 415]

void _getFullResponse( $seq)

Get an entire multi-line response using its sequence number



Tags:

access:  protected


Parameters:

   $seq  

[ Top ]

method _getReversePath [line 350]

void _getReversePath( Swift_Mime_Message $message)

Determine the best-use reverse path for this message



Tags:

access:  protected


Parameters:

Swift_Mime_Message   $message  

[ Top ]

method _readGreeting [line 297]

void _readGreeting( )

Read the opening SMTP greeting



Tags:

access:  protected


[ Top ]

method _streamMessage [line 333]

void _streamMessage( Swift_Mime_Message $message)

Stream the contents of the message over the buffer



Tags:

access:  protected


Parameters:

Swift_Mime_Message   $message  

[ Top ]

method _throwException [line 375]

void _throwException( Swift_TransportException $e)

Throw a TransportException, first sending it to any listeners



Tags:

access:  protected


Parameters:


[ Top ]


Documentation generated on Mon, 05 Sep 2011 20:31:54 -0500 by phpDocumentor 1.4.3