Class 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 56)

Zend_Mime_Message
   |
   --Zend_Mail
Variable Summary
Method Summary
 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 = ''])
 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 62)
  • access: protected
mixed $hasAttachments = false (line 72)
  • access: public
mixed $_bodyHtml = false (line 70)
  • access: protected
mixed $_bodyText = false (line 69)
  • access: protected
mixed $_charset = null (line 63)
  • access: protected
mixed $_from = null (line 65)
  • access: protected
mixed $_headers = array() (line 64)
  • access: protected
mixed $_mimeBoundary = null (line 71)
  • access: protected
mixed $_recipients = array() (line 67)
  • access: protected
mixed $_subject = null (line 68)
  • access: protected
mixed $_to = array() (line 66)
  • access: protected

Inherited Variables

Inherited from Zend_Mime_Message

Zend_Mime_Message::$_mime
Zend_Mime_Message::$_parts
Methods
static setDefaultTransport (line 82)

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)
Constructor __construct (line 92)

Public constructor

  • access: public
Zend_Mail __construct ([string $charset = 'iso-8859-1'])
  • string $charset
addAttachment (line 208)

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

Adds Bcc recipient

  • access: public
void addBcc (string $email)
  • string $email
addCc (line 331)

Adds Cc-header and recipient

  • access: public
void addCc (string $email, [string $name = ''])
  • string $name
  • string $email
addHeader (line 419)

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

Adds To-header and recipient

  • access: public
void addTo (string $email, [string $name = ''])
  • string $name
  • string $email
getBodyHtml (line 193)

Return Zend_Mime_Part representing body HTML

  • access: public
false|Zend_Mime_Part getBodyHtml ()
getBodyText (line 159)

Return text body Zend_Mime_Part

  • access: public
false|Zend_Mime_Part getBodyText ()
getCharset (line 103)

Return charset string

  • access: public
string getCharset ()
getFrom (line 380)

Returns the sender of the mail

  • access: public
string getFrom ()
getHeaders (line 436)

Return mail headers

  • access: public
void getHeaders ()
getMimeBoundary (line 125)

Return the boundary string used for the message

  • access: public
string getMimeBoundary ()
getPartCount (line 231)

Return a count of message parts

  • access: public
void getPartCount ()
getRecipients (line 352)

Return list of recipient email addresses

  • return: (of strings)
  • access: public
array getRecipients ()
getSubject (line 406)

Returns the encoded subject of the message

  • access: public
string getSubject ()
send (line 449)

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])
setBodyHtml (line 171)

Sets the HTML body for the message

  • access: public
Zend_Mime_Part setBodyHtml (string $html, [string $charset = null])
  • string $html
  • string $charset
setBodyText (line 137)

Sets the text body for the message.

  • access: public
Zend_Mime_Part setBodyText (string $txt, [string $charset = null])
  • string $txt
  • string $charset
setFrom (line 364)

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

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

Sets the subject of the message

  • access: public
void setSubject (string $subject)
  • string $subject
_addRecipient (line 286)

Add a recipient

  • access: protected
void _addRecipient (string $email, [ $to = false])
  • string $email
  • $to
_addRecipientAndHeader (line 303)

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

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

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 Fri, 30 Jun 2006 11:21:04 -0500 by phpDocumentor 1.3.0RC6