## Zend_Mail

Description

Class for sending an email.

- license: New BSD License
- copyright: Copyright (c) 2006 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
mixed $hasAttachments
mixed $_bodyHtml
mixed $_bodyText
mixed $_charset
mixed $_from
mixed $_headers
mixed $_mimeBoundary
mixed $_recipients
mixed $_subject
mixed $_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 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 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 67)

- access: protected

mixed $hasAttachments = false (line 77)

- access: public

mixed $_bodyHtml = false (line 75)

- access: protected

mixed $_bodyText = false (line 74)

- access: protected

mixed $_charset = null (line 68)

- access: protected

mixed $_from = null (line 70)

- access: protected

mixed $_headers = array() (line 69)

- access: protected

mixed $_mimeBoundary = null (line 76)

- access: protected

mixed $_recipients = array() (line 72)

- access: protected

mixed $_subject = null (line 73)

- access: protected

mixed $_to = array() (line 71)

- access: protected

#### Inherited Variables

Inherited from Zend_Mime_Message

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

Methods
static setDefaultTransport (line 87)

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

void setDefaultTransport (Zend_Mail_Transport_Abstract $transport)

- Zend_Mail_Transport_Abstract $transport

Constructor __construct (line 97)

Public constructor

- access: public

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

- string $charset

addAttachment (line 213)

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 346)

Adds Bcc recipient

- access: public

void addBcc (string $email)

- string $email

addCc (line 336)

Adds Cc-header and recipient

- access: public

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

- string $name
- string $email

addHeader (line 423)

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 325)

Adds To-header and recipient

- access: public

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

- string $name
- string $email

getBodyHtml (line 198)

Return Zend_Mime_Part representing body HTML

- access: public

false|Zend_Mime_Part getBodyHtml ()
getBodyText (line 164)

Return text body Zend_Mime_Part

- access: public

false|Zend_Mime_Part getBodyText ()
getCharset (line 108)

Return charset string

- access: public

string getCharset ()
getFrom (line 384)

Returns the sender of the mail

- access: public

string getFrom ()
getHeaders (line 440)

Return mail headers

- access: public

void getHeaders ()
getMimeBoundary (line 130)

Return the boundary string used for the message

- access: public

string getMimeBoundary ()
getPartCount (line 236)

Return a count of message parts

- access: public

void getPartCount ()
getRecipients (line 356)

Return list of recipient email addresses

- return: (of strings)
- access: public

array getRecipients ()
getSubject (line 410)

Returns the encoded subject of the message

- access: public

string getSubject ()
send (line 453)

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 176)

Sets the HTML body for the message

- access: public

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

- string $html
- string $charset

setBodyText (line 142)

Sets the text body for the message.

- access: public

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

- string $txt
- string $charset

setFrom (line 368)

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 120)

Set an arbitrary mime boundary for the message

If not set, Zend_Mime will generate one.

- access: public

void setMimeBoundary (string $boundary)

- string $boundary

setSubject (line 394)

Sets the subject of the message

- access: public

void setSubject (string $subject)

- string $subject

_addRecipient (line 291)

Add a recipient

- access: protected

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

- string $email
- $to

_addRecipientAndHeader (line 308)

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 250)

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 271)

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 Tue, 11 Jul 2006 12:17:43 -0500 by phpDocumentor 1.3.0RC6