## Zend_Mail

Description

Class for sending an email.

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

Located in /Zend/Mail.php (line 61)

    Zend_Mime_Message
       |
       --Zend_Mail

Variable Summary
static Zend_Mail_Transport_Abstract $_defaultTransport
boolean $hasAttachments
false|Zend_Mime_Part $_bodyHtml
false|Zend_Mime_Part $_bodyText
string $_charset
string $_from
array $_headers
string $_mimeBoundary
array $_recipients
string $_returnPath
string $_subject
array $_to
Method Summary
static void setDefaultTransport (Zend_Mail_Transport_Abstract $transport)
Zend_Mail __construct ([string $charset = 'iso-8859-1'])
Zend_Mime_Part addAttachment (string $body, [string $mimeType = Zend_Mime::TYPE_OCTETSTREAM], [string $disposition = Zend_Mime::DISPOSITION_ATTACHMENT], [string $encoding = Zend_Mime::ENCODING_BASE64])
void addBcc (string $email)
void addCc (string $email, [string $name = ''])
void addHeader (string $name, string $value, [boolean $append = false])
void addTo (string $email, [string $name = ''])
false|Zend_Mime_Part getBodyHtml ()
false|Zend_Mime_Part getBodyText ()
string getCharset ()
string getFrom ()
void getHeaders ()
string getMimeBoundary ()
void getPartCount ()
array getRecipients ()
string getReturnPath ()
string getSubject ()
void send ([Zend_Mail_Transport_Abstract $transport = null])
Zend_Mime_Part setBodyHtml (string $html, [string $charset = null])
Zend_Mime_Part setBodyText (string $txt, [string $charset = null])
void setFrom (string $email, [string $name = ''])
void setMimeBoundary (string $boundary)
void setReturnPath (string $email)
void setSubject (string $subject)
void _addRecipient (string $email, [ $to = false])
void _addRecipientAndHeader (string $headerName, string $name, string $email)
string _encodeHeader (string $value)
void _storeHeader (string $headerName, string $value, [boolean $append = false])
Variables
static Zend_Mail_Transport_Abstract $_defaultTransport = null (line 71)

- access: protected

boolean $hasAttachments = false (line 140)

Flag: whether or not email has attachments

- access: public

false|Zend_Mime_Part $_bodyHtml = false (line 125)

text/html MIME part

- access: protected

false|Zend_Mime_Part $_bodyText = false (line 119)

text/plain MIME part

- access: protected

string $_charset = null (line 77)

Mail character set

- access: protected

string $_from = null (line 89)

From: address

- access: protected

array $_headers = array() (line 83)

Mail headers

- access: protected

string $_mimeBoundary = null (line 131)

MIME boundary string

- access: protected

array $_recipients = array() (line 101)

Array of all recipients

- access: protected

string $_returnPath = null (line 107)

Return-Path header

- access: protected

string $_subject = null (line 113)

Subject: header

- access: protected

array $_to = array() (line 95)

To: addresses

- access: protected

#### Inherited Variables

Inherited from Zend_Mime_Message

> Zend_Mime_Message::$_mime
> Zend_Mime_Message::$_parts

Methods
static setDefaultTransport (line 150)

Sets the default mail transport for all following uses of Zend_Mail::send();

- access: public
- todo: Allow passing a string to indicate the transport to load
- todo: Allow passing in optional options for the transport to load

static void setDefaultTransport (Zend_Mail_Transport_Abstract $transport)

- Zend_Mail_Transport_Abstract $transport

Constructor __construct (line 160)

Public constructor

- access: public

Zend_Mail __construct ([string $charset = 'iso-8859-1'])

- string $charset

addAttachment (line 276)

Adds an attachment to the message

- return: Newly created Zend_Mime_Part object (to allow advanced settings)
- access: public

Zend_Mime_Part addAttachment (string $body, [string $mimeType = Zend_Mime::TYPE_OCTETSTREAM], [string $disposition = Zend_Mime::DISPOSITION_ATTACHMENT], [string $encoding = Zend_Mime::ENCODING_BASE64])

- string $body
- string $mimeType
- string $disposition
- string $encoding

addBcc (line 409)

Adds Bcc recipient

- access: public

void addBcc (string $email)

- string $email

addCc (line 399)

Adds Cc-header and recipient

- access: public

void addCc (string $email, [string $name = ''])

- string $name
- string $email

addHeader (line 522)

Add a custom header to the message

- access: public
- throws: Zend_Mail_Exception on attempts to create standard headers

void addHeader (string $name, string $value, [boolean $append = false])

- string $name
- string $value
- boolean $append

addTo (line 388)

Adds To-header and recipient

- access: public

void addTo (string $email, [string $name = ''])

- string $name
- string $email

getBodyHtml (line 261)

Return Zend_Mime_Part representing body HTML

- access: public

false|Zend_Mime_Part getBodyHtml ()
getBodyText (line 227)

Return text body Zend_Mime_Part

- access: public

false|Zend_Mime_Part getBodyText ()
getCharset (line 171)

Return charset string

- access: public

string getCharset ()
getFrom (line 447)

Returns the sender of the mail

- access: public

string getFrom ()
getHeaders (line 539)

Return mail headers

- access: public

void getHeaders ()
getMimeBoundary (line 193)

Return the boundary string used for the message

- access: public

string getMimeBoundary ()
getPartCount (line 299)

Return a count of message parts

- access: public

void getPartCount ()
getRecipients (line 419)

Return list of recipient email addresses

- return: (of strings)
- access: public

array getRecipients ()
getReturnPath (line 479)

Returns the current Return-Path address for the email

If no Return-Path header is set, returns the value of $_from.

- access: public

string getReturnPath ()
getSubject (line 509)

Returns the encoded subject of the message

- access: public

string getSubject ()
send (line 552)

Sends this email using the given transport or a previously set DefaultTransport or the internal mail function if no default transport had been set.

- access: public

void send ([Zend_Mail_Transport_Abstract $transport = null])

- Zend_Mail_Transport_Abstract $transport

setBodyHtml (line 239)

Sets the HTML body for the message

- access: public

Zend_Mime_Part setBodyHtml (string $html, [string $charset = null])

- string $html
- string $charset

setBodyText (line 205)

Sets the text body for the message.

- access: public

Zend_Mime_Part setBodyText (string $txt, [string $charset = null])

- string $txt
- string $charset

setFrom (line 431)

Sets From-header and sender of the message

- access: public
- throws: Zend_Mail_Exception if called subsequent times

void setFrom (string $email, [string $name = ''])

- string $email
- string $name

setMimeBoundary (line 183)

Set an arbitrary mime boundary for the message

If not set, Zend_Mime will generate one.

- access: public

void setMimeBoundary (string $boundary)

- string $boundary

setReturnPath (line 460)

Sets the Return-Path header for an email

- access: public
- throws: Zend_Mail_Exception if set multiple times

void setReturnPath (string $email)

- string $email

setSubject (line 493)

Sets the subject of the message

- access: public

void setSubject (string $subject)

- string $subject

_addRecipient (line 354)

Add a recipient

- access: protected

void _addRecipient (string $email, [ $to = false])

- string $email
- $to

_addRecipientAndHeader (line 371)

Helper function for adding a recipient and the corresponding header

- access: protected

void _addRecipientAndHeader (string $headerName, string $name, string $email)

- string $headerName
- string $name
- string $email

_encodeHeader (line 313)

Encode header fields

Encodes header content according to RFC1522 if it contains non-printable characters.

- access: protected

string _encodeHeader (string $value)

- string $value

_storeHeader (line 334)

Add a header to the message

Adds a header to this message. If append is true and the header already exists, raises a flag indicating that the header should be appended.

- access: protected

void _storeHeader (string $headerName, string $value, [boolean $append = false])

- string $headerName
- string $value
- boolean $append

#### Inherited Methods

Inherited From Zend_Mime_Message

> Zend_Mime_Message::addPart()
> Zend_Mime_Message::createFromMessage()
> Zend_Mime_Message::generateMessage()
> Zend_Mime_Message::getMime()
> Zend_Mime_Message::getPartContent()
> Zend_Mime_Message::getPartHeaders()
> Zend_Mime_Message::getPartHeadersArray()
> Zend_Mime_Message::getParts()
> Zend_Mime_Message::isMultiPart()
> Zend_Mime_Message::setMime()
> Zend_Mime_Message::setParts()
> Zend_Mime_Message::_disassembleMime()

Documentation generated on Wed, 21 Feb 2007 11:53:20 -0800 by phpDocumentor 1.3.1