Class for sending email via the PHP internal mail() function

package Default

 Methods

Constructor.

__construct(null|string|array|\Traversable $parameters = null

Parameters

$parameters

nullstringarray\Traversable

OPTIONAL (Default: null)

Temporary error handler for PHP native mail().

handleMailErrors(integer $errno, string $errstr, string $errfile = null, string $errline = null, array $errcontext = null) : boolean

Parameters

$errno

integer

$errstr

string

$errfile

string

$errline

string

$errcontext

array

Returns

booleanalways true

Send mail using PHP native mail()

mailHandler(string $to, string $subject, string $message, string $headers, $parameters) 

Parameters

$to

string

$subject

string

$message

string

$headers

string

$parameters

Exceptions

\Zend\Mail\Exception\RuntimeException

Send a message

send(\Zend\Mail\Message $message) 
inherited_from \Zend\Mail\Transport\TransportInterface::send()

Parameters

$message

\Zend\Mail\Message

Set callback to use for mail

setCallable(callable $callable) : \Zend\Mail\Transport\Sendmail

Primarily for testing purposes, but could be used to curry arguments.

Parameters

$callable

callable

Exceptions

\Zend\Mail\Exception\InvalidArgumentException

Returns

\Zend\Mail\Transport\Sendmail

Set sendmail parameters

setParameters(null|string|array|\Traversable $parameters) : \Zend\Mail\Transport\Sendmail

Used to populate the additional_parameters argument to mail()

Parameters

$parameters

nullstringarray\Traversable

Exceptions

\Zend\Mail\Exception\InvalidArgumentException

Returns

\Zend\Mail\Transport\Sendmail

Is this a windows OS?

isWindowsOs() : boolean

Returns

boolean

Prepare the body string

prepareBody(\Zend\Mail\Message $message) : string

Parameters

$message

\Zend\Mail\Message

Returns

string

Prepare the textual representation of headers

prepareHeaders(\Zend\Mail\Message $message) : string

Parameters

$message

\Zend\Mail\Message

Returns

string

Prepare additional_parameters argument

prepareParameters(\Zend\Mail\Message $message) : string

Basically, overrides the MAIL FROM envelope with either the Sender or From address.

Parameters

$message

\Zend\Mail\Message

Returns

string

Prepare recipients list

prepareRecipients(\Zend\Mail\Message $message) : string

Parameters

$message

\Zend\Mail\Message

Exceptions

\Zend\Mail\Exception\RuntimeException

Returns

string

Prepare the subject line string

prepareSubject(\Zend\Mail\Message $message) : string

Parameters

$message

\Zend\Mail\Message

Returns

string

 Properties

 

Callback to use when sending mail; typically, {@link mailHandler()}

$callable : callable

Default

 

error information

$errstr : string

Default

 

$operatingSystem

$operatingSystem : string

Default

 

Config options for sendmail parameters

$parameters : string

Default