Zend Framework
1.12
|
Public Member Functions | |
__construct ($charset=null) | |
Public constructor. | |
getCharset () | |
Return charset string. | |
setType ($type) | |
Set content type. | |
getType () | |
Get content type of the message. | |
setMimeBoundary ($boundary) | |
Set an arbitrary mime boundary for the message. | |
getMimeBoundary () | |
Return the boundary string used for the message. | |
getEncodingOfHeaders () | |
Return encoding of mail headers. | |
getHeaderEncoding () | |
Return the encoding of mail headers. | |
setEncodingOfHeaders ($encoding) | |
Set the encoding of mail headers. | |
setHeaderEncoding ($encoding) | |
Set the encoding of mail headers. | |
setBodyText ($txt, $charset=null, $encoding=Zend_Mime::ENCODING_QUOTEDPRINTABLE) | |
Sets the text body for the message. | |
getBodyText ($textOnly=false) | |
Return text body Zend_Mime_Part or string. | |
setBodyHtml ($html, $charset=null, $encoding=Zend_Mime::ENCODING_QUOTEDPRINTABLE) | |
Sets the HTML body for the message. | |
getBodyHtml ($htmlOnly=false) | |
Return Zend_Mime_Part representing body HTML. | |
addAttachment (Zend_Mime_Part $attachment) | |
Adds an existing attachment to the mail message. | |
createAttachment ($body, $mimeType=Zend_Mime::TYPE_OCTETSTREAM, $disposition=Zend_Mime::DISPOSITION_ATTACHMENT, $encoding=Zend_Mime::ENCODING_BASE64, $filename=null) | |
Creates a Zend_Mime_Part attachment. | |
getPartCount () | |
Return a count of message parts. | |
addTo ($email, $name='') | |
Adds To-header and recipient, $email can be an array, or a single string address. | |
addCc ($email, $name='') | |
Adds Cc-header and recipient, $email can be an array, or a single string address. | |
addBcc ($email) | |
Adds Bcc recipient, $email can be an array, or a single string address. | |
getRecipients () | |
Return list of recipient email addresses. | |
clearHeader ($headerName) | |
Clear header from the message. | |
clearRecipients () | |
Clears list of recipient email addresses. | |
setFrom ($email, $name=null) | |
Sets From-header and sender of the message. | |
setReplyTo ($email, $name=null) | |
Set Reply-To Header. | |
getFrom () | |
Returns the sender of the mail. | |
getReplyTo () | |
Returns the current Reply-To address of the message. | |
clearFrom () | |
Clears the sender from the mail. | |
clearReplyTo () | |
Clears the current Reply-To address from the message. | |
setFromToDefaultFrom () | |
Sets From-name and -email based on the defaults. | |
setReplyToFromDefault () | |
Sets ReplyTo-name and -email based on the defaults. | |
setReturnPath ($email) | |
Sets the Return-Path header of the message. | |
getReturnPath () | |
Returns the current Return-Path address of the message. | |
clearReturnPath () | |
Clears the current Return-Path address from the message. | |
setSubject ($subject) | |
Sets the subject of the message. | |
getSubject () | |
Returns the encoded subject of the message. | |
clearSubject () | |
Clears the encoded subject from the message. | |
setDate ($date=null) | |
Sets Date-header. | |
getDate () | |
Returns the formatted date of the message. | |
clearDate () | |
Clears the formatted date from the message. | |
setMessageId ($id=true) | |
Sets the Message-ID of the message. | |
getMessageId () | |
Returns the Message-ID of the message. | |
clearMessageId () | |
Clears the Message-ID from the message. | |
createMessageId () | |
Creates the Message-ID. | |
addHeader ($name, $value, $append=false) | |
Add a custom header to the message. | |
getHeaders () | |
Return mail headers. | |
send ($transport=null) | |
Sends this email using the given transport or a previously set DefaultTransport or the internal mail function if no default transport had been set. | |
Static Public Member Functions | |
static | setDefaultTransport (Zend_Mail_Transport_Abstract $transport) |
Sets the default mail transport for all following uses of Zend_Mail::send();. | |
static | getDefaultTransport () |
Gets the default mail transport for all following uses of unittests. | |
static | clearDefaultTransport () |
Clear the default transport property. | |
static | setDefaultFrom ($email, $name=null) |
Sets Default From-email and name of the message. | |
static | getDefaultFrom () |
Returns the default sender of the mail. | |
static | clearDefaultFrom () |
Clears the default sender from the mail. | |
static | setDefaultReplyTo ($email, $name=null) |
Sets Default ReplyTo-address and -name of the message. | |
static | getDefaultReplyTo () |
Returns the default Reply-To Address and Name of the mail. | |
static | clearDefaultReplyTo () |
Clears the default ReplyTo-address and -name from the mail. | |
Public Attributes | |
$hasAttachments = false | |
Protected Member Functions | |
_encodeHeader ($value) | |
Encode header fields. | |
_storeHeader ($headerName, $value, $append=false) | |
Add a header to the message. | |
_clearHeader ($headerName) | |
Clear header from the message. | |
_addRecipientAndHeader ($headerName, $email, $name) | |
Helper function for adding a recipient and the corresponding header. | |
_filterEmail ($email) | |
Filter of email data. | |
_filterName ($name) | |
Filter of name data. | |
_filterOther ($data) | |
Filter of other data. | |
_formatAddress ($email, $name) | |
Formats e-mail address. | |
Protected Attributes | |
$_charset = 'iso-8859-1' | |
$_headers = array() | |
$_headerEncoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE | |
$_from = null | |
$_to = array() | |
$_recipients = array() | |
$_replyTo = null | |
$_returnPath = null | |
$_subject = null | |
$_date = null | |
$_messageId = null | |
$_bodyText = false | |
$_bodyHtml = false | |
$_mimeBoundary = null | |
$_type = null | |
Static Protected Attributes | |
static | $_defaultTransport = null |
static | $_defaultFrom |
static | $_defaultReplyTo |
Additional Inherited Members |
__construct | ( | $charset = null | ) |
Public constructor.
string | $charset |
|
protected |
Helper function for adding a recipient and the corresponding header.
string | $headerName | |
string | ||
string | $name |
|
protected |
|
protected |
Encode header fields.
Encodes header content according to RFC1522 if it contains non-printable characters.
string | $value |
|
protected |
Filter of email data.
string |
|
protected |
Filter of name data.
string | $name |
|
protected |
Filter of other data.
string | $data |
|
protected |
Formats e-mail address.
string | ||
string | $name |
|
protected |
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.
string | $headerName | |
string | $value | |
bool | $append |
addAttachment | ( | Zend_Mime_Part | $attachment | ) |
Adds an existing attachment to the mail message.
Zend_Mime_Part | $attachment |
addBcc | ( | ) |
Adds Bcc recipient, $email can be an array, or a single string address.
string | array |
addCc | ( | $email, | |
$name = '' |
|||
) |
Adds Cc-header and recipient, $email can be an array, or a single string address.
string | array | ||
string | $name |
addHeader | ( | $name, | |
$value, | |||
$append = false |
|||
) |
Add a custom header to the message.
string | $name | |
string | $value | |
boolean | $append |
Zend_Mail_Exception | on attempts to create standard headers |
addTo | ( | $email, | |
$name = '' |
|||
) |
Adds To-header and recipient, $email can be an array, or a single string address.
string | array | ||
string | $name |
clearDate | ( | ) |
Clears the formatted date from the message.
|
static |
Clears the default sender from the mail.
|
static |
Clears the default ReplyTo-address and -name from the mail.
|
static |
Clear the default transport property.
clearFrom | ( | ) |
Clears the sender from the mail.
clearHeader | ( | $headerName | ) |
clearMessageId | ( | ) |
Clears the Message-ID from the message.
clearRecipients | ( | ) |
Clears list of recipient email addresses.
clearReplyTo | ( | ) |
Clears the current Reply-To address from the message.
clearReturnPath | ( | ) |
Clears the current Return-Path address from the message.
clearSubject | ( | ) |
Clears the encoded subject from the message.
createAttachment | ( | $body, | |
$mimeType = Zend_Mime::TYPE_OCTETSTREAM , |
|||
$disposition = Zend_Mime::DISPOSITION_ATTACHMENT , |
|||
$encoding = Zend_Mime::ENCODING_BASE64 , |
|||
$filename = null |
|||
) |
Creates a Zend_Mime_Part attachment.
Attachment is automatically added to the mail object after creation. The attachment object is returned to allow for further manipulation.
string | $body | |
string | $mimeType | |
string | $disposition | |
string | $encoding | |
string | $filename | OPTIONAL A filename for the attachment |
createMessageId | ( | ) |
Creates the Message-ID.
getBodyHtml | ( | $htmlOnly = false | ) |
Return Zend_Mime_Part representing body HTML.
bool | $htmlOnly | Whether to return the body HTML only, or the MIME part; defaults to false, the MIME part |
getBodyText | ( | $textOnly = false | ) |
Return text body Zend_Mime_Part or string.
bool | textOnly Whether to return just the body text content or the MIME part; defaults to false, the MIME part |
getCharset | ( | ) |
Return charset string.
getDate | ( | ) |
Returns the formatted date of the message.
|
static |
Returns the default sender of the mail.
|
static |
Returns the default Reply-To Address and Name of the mail.
|
static |
Gets the default mail transport for all following uses of unittests.
Allow passing a string to indicate the transport to load
Allow passing in optional options for the transport to load
getEncodingOfHeaders | ( | ) |
getFrom | ( | ) |
Returns the sender of the mail.
getHeaderEncoding | ( | ) |
Return the encoding of mail headers.
Either Zend_Mime::ENCODING_QUOTEDPRINTABLE or Zend_Mime::ENCODING_BASE64
getHeaders | ( | ) |
Return mail headers.
getMessageId | ( | ) |
Returns the Message-ID of the message.
getMimeBoundary | ( | ) |
Return the boundary string used for the message.
getPartCount | ( | ) |
Return a count of message parts.
getRecipients | ( | ) |
Return list of recipient email addresses.
getReplyTo | ( | ) |
Returns the current Reply-To address of the message.
getReturnPath | ( | ) |
Returns the current Return-Path address of the message.
If no Return-Path header is set, returns the value of $_from.
getSubject | ( | ) |
Returns the encoded subject of the message.
getType | ( | ) |
Get content type of the message.
send | ( | $transport = null | ) |
Sends this email using the given transport or a previously set DefaultTransport or the internal mail function if no default transport had been set.
Zend_Mail_Transport_Abstract | $transport |
setBodyHtml | ( | $html, | |
$charset = null , |
|||
$encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE |
|||
) |
Sets the HTML body for the message.
string | $html | |
string | $charset | |
string | $encoding |
setBodyText | ( | $txt, | |
$charset = null , |
|||
$encoding = Zend_Mime::ENCODING_QUOTEDPRINTABLE |
|||
) |
Sets the text body for the message.
string | $txt | |
string | $charset | |
string | $encoding |
setDate | ( | $date = null | ) |
Sets Date-header.
timestamp | string | Zend_Date | $date |
Zend_Mail_Exception | if called subsequent times or wrong date format. |
|
static |
Sets Default From-email and name of the message.
string | ||
string | Optional $name |
|
static |
Sets Default ReplyTo-address and -name of the message.
string | ||
string | Optional $name |
|
static |
Sets the default mail transport for all following uses of Zend_Mail::send();.
Allow passing a string to indicate the transport to load
Allow passing in optional options for the transport to load
Zend_Mail_Transport_Abstract | $transport |
setEncodingOfHeaders | ( | $encoding | ) |
Set the encoding of mail headers.
string | $encoding |
setFrom | ( | $email, | |
$name = null |
|||
) |
Sets From-header and sender of the message.
string | ||
string | $name |
Zend_Mail_Exception | if called subsequent times |
setFromToDefaultFrom | ( | ) |
Sets From-name and -email based on the defaults.
setHeaderEncoding | ( | $encoding | ) |
Set the encoding of mail headers.
string | $encoding | Zend_Mime::ENCODING_QUOTEDPRINTABLE or Zend_Mime::ENCODING_BASE64 |
setMessageId | ( | $id = true | ) |
Sets the Message-ID of the message.
boolean | string | $id | true :Auto false :No set null :No set string:Sets given string (Angle brackets is not necessary) |
Zend_Mail_Exception |
setMimeBoundary | ( | $boundary | ) |
setReplyTo | ( | $email, | |
$name = null |
|||
) |
Set Reply-To Header.
string | ||
string | $name |
Zend_Mail_Exception | if called more than one time |
setReplyToFromDefault | ( | ) |
Sets ReplyTo-name and -email based on the defaults.
setReturnPath | ( | ) |
Sets the Return-Path header of the message.
string |
Zend_Mail_Exception | if set multiple times |
setSubject | ( | $subject | ) |
Sets the subject of the message.
string | $subject |
Zend_Mail_Exception |
setType | ( | $type | ) |
Set content type.
Should only be used for manually setting multipart content types.
string | $type | Content type |
Zend_Mail_Exception | for types not supported by Zend_Mime |
|
protected |
|
protected |
|
protected |
|
protected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
$hasAttachments = false |