Overview

Class to build an email message for sending through a transport.

Heavily modified and refactored from Zend_Mail_Message and related classes.

Package

This class is part of the Solar_Mail package.

Inheritance:

Configuration Keys

  • boundary: The default boundary value for separating message parts.

  • charset: The character-set for messages; default is 'utf-8'.

  • encoding: The encoding for messages; default is '8bit'.

  • crlf: The line-ending string to use; default is "\r\n".

  • headers: An array of key-value pairs where the key is the header label and the value is the header value. Default null.

  • transport: A Solar_Mail_Transport dependency injection, for use with the send() method. Default null, which means you need to send this message through a separate transport object.

Constants

None.

Public Properties

The Solar_Mail_Message class has no public properties; try the list of all properties.

Public Methods

These are all the public methods in the Solar_Mail_Message class.

You can also view the list of all public, protected, and private methods.

__construct()

Constructor.

__destruct()

Default destructor; does nothing other than provide a safe fallback for calls to parent::__destruct().

addBcc()

Adds a "Bcc:" address recipient.

addCc()

Adds a "Cc:" address recipient.

addHeader()

Adds a custom header to the message.

addTo()

Adds a "To:" address recipient.

attachFile()

Attaches a file to the message.

attachPart()

Attaches a Solar_Mail_Message_Part to the message.

dump()

Convenience method for getting a dump the whole object, or one of its properties, or an external variable.

fetchContent()

Fetches all the content parts of this message as a string.

fetchHeaders()

Fetches all the headers of this message as a sequential array.

getCharset()

Returns the character set for this message.

getCrlf()

Returns the CRLF sequence for this message.

getEncoding()

Returns the encoding for this message.

getFrom()

Returns the "From:" address for this message.

getHtml()

Returns the Solar_Mail_Message_Part for the HTML portion.

getRcpt()

Returns an array of all recipient addresses.

getReplyTo()

Returns the "Reply-To:" address for this message.

getReturnPath()

Returns the current Return-Path address for the email.

getSubject()

Returns the message subject.

getText()

Returns the Solar_Mail_Message_Part for the plain-text portion.

locale()

Looks up class-specific locale strings based on a key.

resetRcpt()

Resets all recipients in To, Cc and Bcc.

send()

If a transport dependency has been injected, use it to send this email.

setBcc()

Sets the "Bcc:" address recipient, removing previous "Bcc:" recipients.

setCc()

Sets the "Cc:" address recipient, removing previous "Cc:" recipients.

setCharset()

Sets the character set for this message.

setCrlf()

Sets the CRLF sequence for this message.

setEncoding()

Sets the encoding for this message.

setFrom()

Sets the "From:" (sender) on this message.

setHtml()

Sets the part for the HTML portion of this message.

setReplyTo()

Sets the "Reply-To:" on this message.

setReturnPath()

Sets the Return-Path header for an email.

setSubject()

Sets the subject of the message.

setText()

Sets the part for the plain-text portion of this message.

setTo()

Sets the "To:" address recipient, removing previous "To:" recipients.

setTransport()

Sets the Solar_Mail_Transport dependency.



Local