Class Swift_Transport_MailTransport

InheritanceSwift_Transport_MailTransport
ImplementsSwift_Transport
SubclassesSwift_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

Hide inherited methods

MethodDescriptionDefined 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

Hide inherited methods

MethodDescriptionDefined By
_throwException() Throw a TransportException, first sending it to any listeners Swift_Transport_MailTransport

Method Details

__construct() public method

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
_throwException() protected method

Throw a TransportException, first sending it to any listeners

protected void _throwException ( Swift_TransportException $e )
$e
getExtraParams() public method

Get the additional parameters used on the mail() function.

This string is formatted for sprintf() where %s is the sender address.

public string getExtraParams ( )
isStarted() public method

Not used.

public void isStarted ( )
registerPlugin() public method

Register a plugin.

public void registerPlugin ( Swift_Events_EventListener $plugin )
$plugin Swift_Events_EventListener
send() public method

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, &$failedRecipients null )
$message Swift_Mime_Message
$failedRecipients string[]

An array of failures by-reference

setExtraParams() public method

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
start() public method

Not used.

public void start ( )
stop() public method

Not used.

public void stop ( )