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

Public Member Functions

 __construct (Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher)
 
 getCommand ()
 
 send (Swift_Mime_Message $message, &$failedRecipients=null)
 
 setCommand ($command)
 
 start ()
 
- Public Member Functions inherited from Swift_Transport_AbstractSmtpTransport
 __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

 _getBufferParams ()
 
- Protected Member Functions inherited from Swift_Transport_AbstractSmtpTransport
 _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)
 

Private Attributes

 $_params
 

Additional Inherited Members

- Protected Attributes inherited from Swift_Transport_AbstractSmtpTransport
 $_buffer
 
 $_domain = '[127.0.0.1]'
 
 $_eventDispatcher
 
 $_started = false
 

Detailed Description

Definition at line 27 of file SendmailTransport.php.

Constructor & Destructor Documentation

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

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

Parameters
Swift_Transport_IoBuffer$buf
Swift_Events_EventDispatcher$dispatcher

Definition at line 48 of file SendmailTransport.php.

References __construct().

Here is the call graph for this function:

Member Function Documentation

Swift_Transport_SendmailTransport::_getBufferParams ( )
protected

Get the params to initialize the buffer

Definition at line 168 of file SendmailTransport.php.

References $_params.

Swift_Transport_SendmailTransport::getCommand ( )

Get the sendmail command which will be invoked.

Returns
string

Definition at line 84 of file SendmailTransport.php.

Referenced by send(), and start().

Here is the caller graph for this function:

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

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

Implements Swift_Transport.

Definition at line 99 of file SendmailTransport.php.

References Swift_Transport_AbstractSmtpTransport\_getReversePath(), Swift_Transport_AbstractSmtpTransport\_throwException(), elseif(), Swift_Mime_Message\generateId(), Swift_Mime_Message\getBcc(), Swift_Transport_AbstractSmtpTransport\getBuffer(), Swift_Mime_Message\getCc(), getCommand(), Swift_Mime_Message\getTo(), Swift_Events_SendEvent\RESULT_SUCCESS, and Swift_Mime_MimeEntity\toByteStream().

Here is the call graph for this function:

Swift_Transport_SendmailTransport::setCommand (   $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.

Parameters
string$command

Definition at line 74 of file SendmailTransport.php.

Referenced by Swift_SendmailTransport\__construct().

Here is the caller graph for this function:

Swift_Transport_SendmailTransport::start ( )

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

Implements Swift_Transport.

Definition at line 57 of file SendmailTransport.php.

References getCommand().

Here is the call graph for this function:

Member Data Documentation

Swift_Transport_SendmailTransport::$_params
private
Initial value:
= array(
'timeout' => 30,
'blocking' => 1,
'command' => '/usr/sbin/sendmail -bs',
)

Definition at line 36 of file SendmailTransport.php.

Referenced by _getBufferParams().


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