Class Swift_Transport_MailTransport
Inheritance | Swift_Transport_MailTransport |
---|---|
Implements | Swift_Transport |
Subclasses | Swift_MailTransport |
Sends Messages using the mail() function.
It is advised that users do not use this transport if at all possible since a number of plugin features cannot be used in conjunction with this transport due to the internal interface in PHP itself.
The level of error reporting with this transport is incredibly weak, again due to limitations of PHP's internal mail() function. You'll get an all-or-nothing result from sending.
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Create a new MailTransport with the $log. | Swift_Transport_MailTransport |
getExtraParams() | Get the additional parameters used on the mail() function. | Swift_Transport_MailTransport |
isStarted() | Not used. | Swift_Transport_MailTransport |
registerPlugin() | Register a plugin. | Swift_Transport_MailTransport |
send() | Send the given Message. | Swift_Transport_MailTransport |
setExtraParams() | Set the additional parameters used on the mail() function. | Swift_Transport_MailTransport |
start() | Not used. | Swift_Transport_MailTransport |
stop() | Not used. | Swift_Transport_MailTransport |
Protected Methods
Method | Description | Defined By |
---|---|---|
_throwException() | Throw a TransportException, first sending it to any listeners | Swift_Transport_MailTransport |
Method Details
Create a new MailTransport with the $log.
public void __construct ( Swift_Transport_MailInvoker $invoker, Swift_Events_EventDispatcher $eventDispatcher ) | ||
$invoker | Swift_Transport_MailInvoker | |
$eventDispatcher | Swift_Events_EventDispatcher |
Throw a TransportException, first sending it to any listeners
protected void _throwException ( Swift_TransportException $e ) | ||
$e |
Get the additional parameters used on the mail() function.
This string is formatted for sprintf() where %s is the sender address.
public string getExtraParams ( ) |
Not used.
public void isStarted ( ) |
Register a plugin.
public void registerPlugin ( Swift_Events_EventListener $plugin ) | ||
$plugin | Swift_Events_EventListener |
Send the given Message.
Recipient/sender data will be retrieved from the Message API. The return value is the number of recipients who were accepted for delivery.
public int send ( Swift_Mime_Message $message, <b>&</b>$failedRecipients = null ) | ||
$message | Swift_Mime_Message | |
$failedRecipients | string[] | An array of failures by-reference |
Set the additional parameters used on the mail() function.
This string is formatted for sprintf() where %s is the sender address.
public Swift_Transport_MailTransport setExtraParams ( $params ) | ||
$params | string |
Not used.
public void start ( ) |
Not used.
public void stop ( ) |