Abstract for sending eMails through different ways of transport

category Zend
package Zend_Mail
subpackage Transport
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License

 Methods

Send a mail using this transport

send(\Zend_Mail $mail) : void
access public

Parameters

$mail

\Zend_Mail

Exceptions

\Zend_Mail_Transport_Exception if mail is empty

Generate MIME compliant message from the current configuration

_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.

Prepend header name to header value

_formatHeader(string $item, string $key, string $prefix) : void
Static
static
access protected

Parameters

$item

string

$key

string

$prefix

string

Return all mail headers as an array

_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.

Parameters

$boundary

string

Returns

array

Prepare header string for use in transport

_prepareHeaders(mixed $headers) : void

Prepares and generates \$header based on the headers provided.

access protected

Parameters

$headers

mixed

Exceptions

\Zend_Mail_Transport_Exception if any header lines exceed 998 characters

Send an email independent from the used transport

_sendMail() 

The requisite information for the email will be found in the following properties:

  • \$recipients - list of recipients (string)
  • \$header - message header
  • \$body - message body

 Properties

 

EOL character string used by transport

$EOL : string

Default

"\r\n"
access public
 

Mail body

$body : string

Default

''
access public
 

MIME boundary

$boundary : string

Default

''
access public
 

Mail header string

$header : string

Default

''
access public
 

Recipients string

$recipients : string

Default

''
access public
 

Array of message headers

$_headers : array

Default

array()
access protected
 

Message is a multipart message

$_isMultipart : boolean

Default

false
access protected
 

Zend_Mail object

$_mail : false | \Zend_Mail

Default

false
access protected
 

Array of message parts

$_parts : array

Default

array()
access protected