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

Class: Swift_Transport_SendmailTransport

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

Class Overview

Swift_Transport_AbstractSmtpTransport
   |
   --Swift_Transport_SendmailTransport

SendmailTransport for sending mail through a sendmail/postfix (etc..) binary.


Author(s):

  • Chris Corbyn

Methods


Child classes:

Swift_SendmailTransport
SendmailTransport for sending mail through a sendmail/postfix (etc..) binary.

Inherited Variables

Inherited Methods

Class: Swift_Transport_AbstractSmtpTransport

Swift_Transport_AbstractSmtpTransport::__construct()
Creates a new EsmtpTransport using the given I/O buffer.
Swift_Transport_AbstractSmtpTransport::executeCommand()
Run a command against the buffer, expecting the given response codes.
Swift_Transport_AbstractSmtpTransport::getBuffer()
Get the IoBuffer where read/writes are occurring.
Swift_Transport_AbstractSmtpTransport::getLocalDomain()
Get the name of the domain Swift will identify as.
Swift_Transport_AbstractSmtpTransport::isStarted()
Test if an SMTP connection has been established.
Swift_Transport_AbstractSmtpTransport::registerPlugin()
Register a plugin.
Swift_Transport_AbstractSmtpTransport::reset()
Reset the current mail transaction.
Swift_Transport_AbstractSmtpTransport::send()
Send the given Message.
Swift_Transport_AbstractSmtpTransport::setLocalDomain()
Set the name of the local domain which Swift will identify itself as.
Swift_Transport_AbstractSmtpTransport::start()
Start the SMTP connection.
Swift_Transport_AbstractSmtpTransport::stop()
Stop the SMTP connection.
Swift_Transport_AbstractSmtpTransport::_assertResponseCode()
Throws an Exception if a response code is incorrect
Swift_Transport_AbstractSmtpTransport::_doDataCommand()
Send the DATA command
Swift_Transport_AbstractSmtpTransport::_doHeloCommand()
Send the HELO welcome
Swift_Transport_AbstractSmtpTransport::_doMailFromCommand()
Send the MAIL FROM command
Swift_Transport_AbstractSmtpTransport::_doRcptToCommand()
Send the RCPT TO command
Swift_Transport_AbstractSmtpTransport::_getBufferParams()
Return an array of params for the Buffer
Swift_Transport_AbstractSmtpTransport::_getFullResponse()
Get an entire multi-line response using its sequence number
Swift_Transport_AbstractSmtpTransport::_getReversePath()
Determine the best-use reverse path for this message
Swift_Transport_AbstractSmtpTransport::_readGreeting()
Read the opening SMTP greeting
Swift_Transport_AbstractSmtpTransport::_streamMessage()
Stream the contents of the message over the buffer
Swift_Transport_AbstractSmtpTransport::_throwException()
Throw a TransportException, first sending it to any listeners
Swift_Transport_AbstractSmtpTransport::__destruct()
Destructor.

Class Details

[line 27]
SendmailTransport for sending mail through a sendmail/postfix (etc..) binary.

Supported modes are -bs and -t, with any additional flags desired. It is advised to use -bs mode since error reporting with -t mode is not possible.




Tags:

author:  Chris Corbyn
filesource:  Source Code for this file


[ Top ]


Class Methods


constructor __construct [line 48]

Swift_Transport_SendmailTransport __construct( Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher)

Create a new SendmailTransport with $buf for I/O.



Tags:

access:  public


Overridden in child classes as:

Swift_SendmailTransport::__construct()
Create a new SendmailTransport, optionally using $command for sending.

Overrides Swift_Transport_AbstractSmtpTransport::__construct() (Creates a new EsmtpTransport using the given I/O buffer.)

Parameters:

Swift_Transport_IoBuffer   $buf  
Swift_Events_EventDispatcher   $dispatcher  

[ Top ]

method getCommand [line 84]

string getCommand( )

Get the sendmail command which will be invoked.



Tags:

access:  public


[ Top ]

method send [line 99]

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. NOTE: If using 'sendmail -t' you will not be aware of any failures until they bounce (i.e. send() will always return 100% success).




Tags:

access:  public


Overrides Swift_Transport_AbstractSmtpTransport::send() (Send the given Message.)

Parameters:

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

[ Top ]

method setCommand [line 74]

void setCommand( string $command)

Set the command to invoke.

If using -t mode you are strongly advised to include -oi or -i in the flags. For example: /usr/sbin/sendmail -oi -t Swift will append a -f<sender> flag if one is not present. The recommended mode is "-bs" since it is interactive and failure notifications are hence possible.




Tags:

access:  public


Parameters:

string   $command  

[ Top ]

method start [line 57]

void start( )

Start the standalone SMTP session if running in -bs mode.



Tags:

access:  public


Overrides Swift_Transport_AbstractSmtpTransport::start() (Start the SMTP connection.)

[ Top ]

method _getBufferParams [line 168]

void _getBufferParams( )

Get the params to initialize the buffer



Tags:

access:  protected


Overrides Swift_Transport_AbstractSmtpTransport::_getBufferParams() (Return an array of params for the Buffer)

[ Top ]


Documentation generated on Mon, 05 Sep 2011 20:34:13 -0500 by phpDocumentor 1.4.3