Class for sending eMails via the PHP internal mail() function
category | Zend |
---|---|
package | Zend_Mail |
subpackage | Transport |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
inherited_from | \Zend_Mail_Transport_Abstract |
__construct(string|array|\Zend_Config $parameters = null
) : void
string
array
\Zend_Config
OPTIONAL (Default: null)
_handleMailErrors(integer $errno, string $errstr, string $errfile= null
, string $errline= null
, array $errcontext= null
) : true
integer
string
string
string
array
true
_sendMail() : void
The requisite information for the email will be found in the following properties:
access | public |
---|---|
inherited_from | \Zend_Mail_Transport_Abstract::_sendMail() |
\Zend_Mail_Transport_Exception |
if parameters is set but not a string |
---|---|
\Zend_Mail_Transport_Exception |
on mail() failure |
send(\Zend_Mail $mail) : void
access | public |
---|
\Zend_Mail
\Zend_Mail_Transport_Exception |
if mail is empty |
---|
_buildBody() : void
If both a text and HTML body are present, generates a multipart/alternative Zend_Mime_Part containing the headers and contents of each. Otherwise, uses whichever of the text or HTML parts present.
The content part is then prepended to the list of Zend_Mime_Parts for this message.
_formatHeader(string $item, string $key, string $prefix) : void
static | |
---|---|
access | protected |
string
string
string
_getHeaders(string $boundary) : array
If a boundary is given, a multipart header is generated with a Content-Type of either multipart/alternative or multipart/mixed depending on the mail parts present in the \$_mail present.
string
array
_prepareHeaders(array $headers) : void
mail() uses its $to and $subject arguments to set the To: and Subject: headers, respectively. This method strips those out as a sanity check to prevent duplicate header entries.
access | protected |
---|---|
inherited_from | \Zend_Mail_Transport_Abstract::_prepareHeaders() |
array
\Zend_Mail_Transport_Exception |
---|
_prepareHeaders(mixed $headers) : void
Prepares and generates \$header based on the headers provided.
access | protected |
---|
mixed
\Zend_Mail_Transport_Exception |
if any header lines exceed 998 characters |
---|
_sendMail()
The requisite information for the email will be found in the following properties:
$EOL : string
PHP_EOL
access | public |
---|---|
inherited_from | \Zend_Mail_Transport_Abstract::EOL |
$EOL : string
"\r\n"
access | public |
---|
$body : string
''
access | public |
---|
$boundary : string
''
access | public |
---|
$header : string
''
access | public |
---|
$parameters : string
$recipients : string
''
access | public |
---|
$subject : string
null
access | public |
---|
$_errstr : string
$_headers : array
array()
access | protected |
---|
$_isMultipart : boolean
false
access | protected |
---|
$_mail : false | \Zend_Mail
false
access | protected |
---|
$_parts : array
array()
access | protected |
---|