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, optionally specifying $extraParams.

__construct(string $extraParams) 

Parameters

$extraParams

string

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

getExtraParams() : string
Inherited

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

inherited_from \Swift_Transport_MailTransport::getExtraParams()

Returns

string

Not used.

isStarted() : boolean
Inherited
inherited_from \Swift_Transport_MailTransport::isStarted()

Returns

boolean

Create a new MailTransport instance.

newInstance(string $extraParams) : \Swift_MailTransport
Static

Parameters

$extraParams

string

To be passed to mail()

Returns

Register a plugin.

registerPlugin(\Swift_Events_EventListener $plugin) 
Inherited
inherited_from \Swift_Transport_MailTransport::registerPlugin()

Parameters

Send the given Message.

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

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

inherited_from \Swift_Transport_MailTransport::send()

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
Inherited

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

inherited_from \Swift_Transport_MailTransport::setExtraParams()

Parameters

$params

string

Returns

Not used.

start() 
Inherited
inherited_from \Swift_Transport_MailTransport::start()

Not used.

stop() 
Inherited
inherited_from \Swift_Transport_MailTransport::stop()

Determine the best-use reverse path for this message

_getReversePath(\Swift_Mime_Message $message) 
Inherited
inherited_from \Swift_Transport_MailTransport::_getReversePath()

Parameters

$message

 Properties

 

$_eventDispatcher 
Inherited
inherited_from \Swift_Transport_MailTransport::$$_eventDispatcher
 

$_extraParams 
Inherited
inherited_from \Swift_Transport_MailTransport::$$_extraParams
 

$_invoker 
Inherited
inherited_from \Swift_Transport_MailTransport::$$_invoker