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.

package Swift
subpackage Transport
author Chris Corbyn

 Methods

Create a new MailTransport with the $log.

__construct(\Swift_Transport_MailInvoker $invoker, \Swift_Events_EventDispatcher $eventDispatcher) 

Parameters

$invoker

$eventDispatcher

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

getExtraParams() : string

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

Returns

string

Not used.

isStarted() : boolean

Returns

boolean

Register a plugin.

registerPlugin(\Swift_Events_EventListener $plugin) 

Parameters

Send the given Message.

send(\Swift_Mime_Message $message, string[] $failedRecipients) : int

Recipient/sender data will be retrieved from the Message API. The return value is the number of recipients who were accepted for delivery.

Parameters

$failedRecipients

string[]

&$failedRecipients to collect failures by-reference

Returns

int

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

setExtraParams(string $params) : \Swift_Transport_MailTransport

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

Parameters

$params

string

Returns

Not used.

start() 

Not used.

stop() 

Determine the best-use reverse path for this message

_getReversePath(\Swift_Mime_Message $message) 

Parameters

$message

 Properties

 

$_eventDispatcher 
 

$_extraParams 
 

$_invoker