## Zend_Mail_Transport_Abstract

Description

Abstract for sending eMails through different ways of transport

- abstract:
- license: New BSD License
- copyright: Copyright (c) 2006 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Zend/Mail/Transport/Abstract.php (line 42)

Direct descendents

Class | Description
--- | ---
Zend_Mail_Transport_Sendmail | Class for sending eMails via the PHP internal mail() function
Zend_Mail_Transport_Smtp | SMTP connection object minimum implementation according to RFC2821: EHLO, MAIL FROM, RCPT TO, DATA, RSET, NOOP, QUIT

Variable Summary
string $body
string $boundary
string $EOL
string $header
string $recipients
array $_headers
boolean $_isMultipart
false|Zend_Mail $_mail
array $_parts
Method Summary
static void _formatHeader ( &$item, string $key, string $prefix, string $item)
void send (Zend_Mail $mail)
void _buildBody ()
array _getHeaders (string $boundary)
void _prepareHeaders (mixed $headers)
void _sendMail ()
Variables
string $body = '' (line 48)

Mail body

- access: public

string $boundary = '' (line 55)

MIME boundary

- access: public

string $EOL = "\r\n" (line 104)

EOL character string used by transport

- access: public

Redefined in descendants as:

- Zend_Mail_Transport_Sendmail::$EOL : EOL character string

string $header = '' (line 62)

Mail header string

- access: public

string $recipients = '' (line 97)

Recipients string

- access: public

array $_headers = array() (line 69)

Array of message headers

- access: protected

boolean $_isMultipart = false (line 76)

Message is a multipart message

- access: protected

false|Zend_Mail $_mail = false (line 83)

Zend_Mail object

- access: protected

array $_parts = array() (line 90)

Array of message parts

- access: protected

Methods
static _formatHeader (line 163)

Prepend header name to header value

- access: protected

void _formatHeader ( &$item, string $key, string $prefix, string $item)

- string $item
- string $key
- string $prefix
- &$item

send (line 289)

Send a mail using this transport

- access: public
- throws: Zend_Mail_Transport_Exception if mail is empty

void send (Zend_Mail $mail)

- Zend_Mail $mail

_buildBody (line 221)

Generate MIME compliant message from the current configuration

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.

- access: protected

void _buildBody ()
_getHeaders (line 128)

Return all mail headers as an 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 Zend_Mail object present.

- access: protected

array _getHeaders (string $boundary)

- string $boundary

_prepareHeaders (line 179)

Prepare header string for use in transport

Prepares and generates $header based on the headers provided.

- access: protected
- throws: Zend_Mail_Transport_Exception if any header lines exceed 998 characters

void _prepareHeaders (mixed $headers)

- mixed $headers

Redefined in descendants as:

- Zend_Mail_Transport_Sendmail::_prepareHeaders() : Format and fix headers

_sendMail (line 116)

Send an email independent from the used transport

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

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

- access: protected
- abstract:

void _sendMail ()

Redefined in descendants as:

- Zend_Mail_Transport_Sendmail::_sendMail() : Send mail using PHP native mail()
- Zend_Mail_Transport_Smtp::_sendMail() : Send an email

Documentation generated on Tue, 11 Jul 2006 12:16:23 -0500 by phpDocumentor 1.3.0RC6