Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Class for sending an email.
false|Zend_Mime_Part $_bodyHtml = 'false'text/html MIME part
Detailsfalse|Zend_Mime_Part $_bodyText = 'false'text/plain MIME part
Detailsstring $_charset = 'null'Mail character set
Detailsstring $_date = 'null'Date: header
Detailsarray $_defaultFrom = ''
Detailsarray $_defaultReplyTo = ''
DetailsZend_Mail_Transport_Abstract $_defaultTransport = 'null'
Detailsstring $_from = 'null'From: address
Detailsstring $_headerEncoding = 'Zend_Mime'Encoding of Mail headers
Detailsarray $_headers = 'array'Mail headers
Detailsstring $_messageId = 'null'Message-ID: header
Detailsstring $_mimeBoundary = 'null'MIME boundary string
Detailsarray $_recipients = 'array'Array of all recipients
Detailsstring $_replyTo = 'null'Reply-To header
Detailsstring $_returnPath = 'null'Return-Path header
Detailsstring $_subject = 'null'Subject: header
Detailsarray $_to = 'array'To: addresses
Detailsstring $_type = 'null'Content type of the message
Detailsboolean $hasAttachments = 'false'Flag: whether or not email has attachments
Details__construct(
string $charset
=
iso-8859-1
)
:
Public constructor
Details_addRecipientAndHeader(
string $headerName, string $email, string $name
)
:
Helper function for adding a recipient and the corresponding header
Details_clearHeader(
string $headerName
)
:
Clear header from the message
Details_encodeHeader(
string $value
)
:
stringEncode header fields
Encodes header content according to RFC1522 if it contains non-printable characters.
Details_filterEmail(
string $email
)
:
stringFilter of email data
Details_filterName(
string $name
)
:
stringFilter of name data
Details_filterOther(
string $data
)
:
stringFilter of other data
Details_formatAddress(
string $email, string $name
)
:
stringFormats e-mail address
Details_storeHeader(
string $headerName, string $value, bool $append
=
false
)
:
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.
DetailsaddAttachment(
Zend_Mime_Part $attachment
)
:
Zend_MailAdds an existing attachment to the mail message
DetailsaddBcc(
string|array $email
)
:
Zend_MailAdds Bcc recipient, $email can be an array, or a single string address
DetailsaddCc(
string|array $email, string $name
)
:
Zend_MailAdds Cc-header and recipient, $email can be an array, or a single string address
DetailsaddHeader(
string $name, string $value, boolean $append
=
false
)
:
Zend_MailAdd a custom header to the message
DetailsaddTo(
string|array $email, string $name
)
:
Zend_MailAdds To-header and recipient, $email can be an array, or a single string address
DetailsclearDate(
)
:
Zend_MailClears the formatted date from the message
DetailsclearDefaultFrom(
)
:
voidClears the default sender from the mail
DetailsclearDefaultReplyTo(
)
:
voidClears the default ReplyTo-address and -name from the mail
DetailsclearDefaultTransport(
)
:
Clear the default transport property
DetailsclearFrom(
)
:
Zend_MailClears the sender from the mail
DetailsclearMessageId(
)
:
Zend_MailClears the Message-ID from the message
DetailsclearRecipients(
)
:
Zend_MailClears list of recipient email addresses
DetailsclearReplyTo(
)
:
Zend_MailClears the current Reply-To address from the message
DetailsclearReturnPath(
)
:
Zend_MailClears the current Return-Path address from the message
DetailsclearSubject(
)
:
Zend_MailClears the encoded subject from the message
DetailscreateAttachment(
string $body, string $mimeType
=
Zend_Mime, string $disposition
=
Zend_Mime, string $encoding
=
Zend_Mime, string $filename
=
null
)
:
Zend_Mime_PartCreates 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.
DetailscreateMessageId(
)
:
stringCreates the Message-ID
DetailsgetBodyHtml(
bool $htmlOnly
=
false
)
:
false|Zend_Mime_Part|stringReturn Zend_Mime_Part representing body HTML
DetailsgetBodyText(
bool $textOnly
=
false
)
:
false|Zend_Mime_Part|stringReturn text body Zend_Mime_Part or string
DetailsgetCharset(
)
:
stringReturn charset string
DetailsgetDate(
)
:
stringReturns the formatted date of the message
DetailsgetDefaultFrom(
)
:
null|arrayReturns the default sender of the mail
DetailsgetDefaultReplyTo(
)
:
null|arrayReturns the default Reply-To Address and Name of the mail
DetailsgetDefaultTransport(
)
:
Gets the default mail transport for all following uses of unittests
DetailsgetEncodingOfHeaders(
)
:
stringReturn encoding of mail headers
DetailsgetFrom(
)
:
stringReturns the sender of the mail
DetailsgetHeaderEncoding(
)
:
stringReturn the encoding of mail headers
Either Zend_Mime::ENCODING_QUOTEDPRINTABLE or Zend_Mime::ENCODING_BASE64
DetailsgetHeaders(
)
:
voidReturn mail headers
DetailsgetMessageId(
)
:
stringReturns the Message-ID of the message
DetailsgetMimeBoundary(
)
:
stringReturn the boundary string used for the message
DetailsgetPartCount(
)
:
integerReturn a count of message parts
DetailsgetRecipients(
)
:
arrayReturn list of recipient email addresses
DetailsgetReplyTo(
)
:
string|nullReturns the current Reply-To address of the message
DetailsgetReturnPath(
)
:
stringReturns the current Return-Path address of the message
If no Return-Path header is set, returns the value of {@link $_from}.
DetailsgetSubject(
)
:
stringReturns the encoded subject of the message
DetailsgetType(
)
:
stringGet content type of the message
Detailssend(
Zend_Mail_Transport_Abstract $transport
=
null
)
:
Zend_MailSends this email using the given transport or a previously set DefaultTransport or the internal mail function if no default transport had been set.
DetailssetBodyHtml(
string $html, string $charset
=
null, string $encoding
=
Zend_Mime
)
:
Zend_MailSets the HTML body for the message
DetailssetBodyText(
string $txt, string $charset
=
null, string $encoding
=
Zend_Mime
)
:
Zend_MailSets the text body for the message.
DetailssetDate(
timestamp|string|Zend_Date $date
=
null
)
:
Zend_MailSets Date-header
DetailssetDefaultFrom(
string $email, string $name
=
null
)
:
voidSets Default From-email and name of the message
DetailssetDefaultReplyTo(
string $email, string $name
=
null
)
:
voidSets Default ReplyTo-address and -name of the message
DetailssetDefaultTransport(
Zend_Mail_Transport_Abstract $transport
)
:
Sets the default mail transport for all following uses of Zend_Mail::send();
DetailssetEncodingOfHeaders(
string $encoding
)
:
Zend_MailSet the encoding of mail headers
DetailssetFrom(
string $email, string $name
=
null
)
:
Zend_MailSets From-header and sender of the message
DetailssetFromToDefaultFrom(
)
:
Zend_MailSets From-name and -email based on the defaults
DetailssetHeaderEncoding(
string $encoding
)
:
Zend_MailSet the encoding of mail headers
DetailssetMessageId(
boolean|string $id
=
true
)
:
Zend_MailSets the Message-ID of the message
DetailssetMimeBoundary(
string $boundary
)
:
Zend_MailSet an arbitrary mime boundary for the message
If not set, Zend_Mime will generate one.
DetailssetReplyTo(
string $email, string $name
=
null
)
:
Zend_MailSet Reply-To Header
DetailssetReplyToFromDefault(
)
:
Zend_MailSets ReplyTo-name and -email based on the defaults
DetailssetReturnPath(
string $email
)
:
Zend_MailSets the Return-Path header of the message
DetailssetSubject(
string $subject
)
:
Zend_MailSets the subject of the message
Details