PHP Class Swift_Transport_SendmailTransport, Halite
.) 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.
ファイルを表示
Open project: HaliteChallenge/Halite
Class Usage Examples
Public Methods
Method |
Description |
|
__construct ( Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher ) |
Create a new SendmailTransport with $buf for I/O. |
|
getCommand ( ) : string |
Get the sendmail command which will be invoked. |
|
send ( Swift_Mime_Message $message, string[] &$failedRecipients = null ) : integer |
Send the given Message. |
|
setCommand ( string $command ) : Swift_Transport_SendmailTransport |
Set the command to invoke. |
|
start ( ) |
Start the standalone SMTP session if running in -bs mode. |
|
Protected Methods
Method Details
__construct()
public method
Create a new SendmailTransport with $buf for I/O.
public __construct ( Swift_Transport_IoBuffer $buf, Swift_Events_EventDispatcher $dispatcher ) |
$buf |
Swift_Transport_IoBuffer |
|
$dispatcher |
Swift_Events_EventDispatcher |
|
_getBufferParams()
protected method
Get the params to initialize the buffer
getCommand()
public method
Get the sendmail command which will be invoked.
Recipient/sender data will be retrieved 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).
public send ( Swift_Mime_Message $message, string[] &$failedRecipients = null ) : integer |
$message |
Swift_Mime_Message |
|
$failedRecipients |
string[] |
An array of failures by-reference |
return |
integer |
|
setCommand()
public method
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 flag if one is not present.
The recommended mode is "-bs" since it is interactive and failure notifications
are hence possible.
public setCommand ( string $command ) : Swift_Transport_SendmailTransport |
$command |
string |
|
return |
Swift_Transport_SendmailTransport |
|
Start the standalone SMTP session if running in -bs mode.