1945. Class

1945.1. Zend\Mail\Transport\Sendmail

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

1945.1.1. Methods

1945.1.1.1. __construct

__construct()

Constructor.

Parameters:null|string|array|Traversable – OPTIONAL (Default: null)

1945.1.1.2. setParameters

setParameters()

Set sendmail parameters

Used to populate the additional_parameters argument to mail()

Parameters:null|string|array|Traversable
Throws ZendMailExceptionInvalidArgumentException:
 
Return type:Sendmail

1945.1.1.3. setCallable

setCallable()

Set callback to use for mail

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

Parameters:callable
Throws ZendMailExceptionInvalidArgumentException:
 
Return type:Sendmail

1945.1.1.4. send

send()

Send a message

Parameters:ZendMailMessage

1945.1.1.5. prepareRecipients

prepareRecipients()

Prepare recipients list

Parameters:ZendMailMessage
Throws ZendMailExceptionRuntimeException:
 
Return type:string

1945.1.1.6. prepareSubject

prepareSubject()

Prepare the subject line string

Parameters:ZendMailMessage
Return type:string

1945.1.1.7. prepareBody

prepareBody()

Prepare the body string

Parameters:ZendMailMessage
Return type:string

1945.1.1.8. prepareHeaders

prepareHeaders()

Prepare the textual representation of headers

Parameters:ZendMailMessage
Return type:string

1945.1.1.9. prepareParameters

prepareParameters()

Prepare additional_parameters argument

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

Parameters:ZendMailMessage
Return type:string

1945.1.1.10. mailHandler

mailHandler()

Send mail using PHP native mail()

Parameters:
  • string
  • string
  • string
  • string
  • $parameters
Throws ZendMailExceptionRuntimeException:
 

1945.1.1.11. handleMailErrors

handleMailErrors()

Temporary error handler for PHP native mail().

Parameters:
  • int
  • string
  • string
  • string
  • array
Return type:

bool always true

1945.1.1.12. isWindowsOs

isWindowsOs()

Is this a windows OS?

Return type:bool