Class Swift_Message

InheritanceSwift_Message » Swift_Mime_SimpleMessage » Swift_Mime_MimePart » Swift_Mime_SimpleMimeEntity
ImplementsSwift_Mime_Message, Swift_Mime_MimeEntity
SubclassesSwift_SignedMessage

The Message class for building emails.

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$_userCharset The charset last specified by the user Swift_Mime_MimePart
$_userContentType Swift_Mime_SimpleMimeEntity
$_userDelSp The delsp parameter last specified by the user Swift_Mime_MimePart
$_userFormat The format parameter last specified by the user Swift_Mime_MimePart

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__clone() Clone Message Signers. Swift_Message
__construct() Create a new Message. Swift_Message
__destruct() Empties it's own contents from the cache. Swift_Mime_SimpleMimeEntity
__toString() Returns a string representation of this object. Swift_Mime_SimpleMessage
__wakeup() Swift_Message
addBcc() Add a Bcc: address to this message. Swift_Mime_SimpleMessage
addCc() Add a Cc: address to this message. Swift_Mime_SimpleMessage
addFrom() Add a From: address to this message. Swift_Mime_SimpleMessage
addPart() Add a MimePart to this Message. Swift_Message
addReplyTo() Add a Reply-To: address to this message. Swift_Mime_SimpleMessage
addTo() Add a To: address to this message. Swift_Mime_SimpleMessage
attach() Attach a {@link Swift_Mime_MimeEntity} such as an Attachment or MimePart. Swift_Mime_SimpleMessage
attachSigner() Attach a new signature handler to the message. Swift_Message
charsetChanged() Receive notification that the charset of this entity, or a parent entity has changed. Swift_Mime_SimpleMimeEntity
detach() Remove an already attached entity. Swift_Mime_SimpleMessage
detachSigner() Attach a new signature handler to the message. Swift_Message
embed() Attach a {@link Swift_Mime_MimeEntity} and return it's CID source. Swift_Mime_SimpleMessage
encoderChanged() Receive notification that the encoder of this entity or a parent entity has changed. Swift_Mime_SimpleMimeEntity
generateId() Generate a new Content-ID or Message-ID for this MIME entity. Swift_Mime_SimpleMimeEntity
getBcc() Get the Bcc addresses of this message. Swift_Mime_SimpleMessage
getBody() Get the body of this entity as a string. Swift_Mime_SimpleMimeEntity
getBoundary() Get the boundary used to separate children in this entity. Swift_Mime_SimpleMimeEntity
getCc() Get the Cc address of this message. Swift_Mime_SimpleMessage
getCharset() Get the character set of this entity. Swift_Mime_MimePart
getChildren() Get all children added to this entity. Swift_Mime_SimpleMimeEntity
getContentType() Get the Content-type of this entity. Swift_Mime_SimpleMimeEntity
getDate() Get the date at which this message was created. Swift_Mime_SimpleMessage
getDelSp() Test if delsp is being used for this entity. Swift_Mime_MimePart
getDescription() Get the description of this entity. Swift_Mime_SimpleMimeEntity
getEncoder() Get the encoder used for the body of this entity. Swift_Mime_SimpleMimeEntity
getFormat() Get the format of this entity (i.e. flowed or fixed). Swift_Mime_MimePart
getFrom() Get the from address of this message. Swift_Mime_SimpleMessage
getHeaders() Get the {@link Swift_Mime_HeaderSet} for this entity. Swift_Mime_SimpleMimeEntity
getId() Get the CID of this entity. Swift_Mime_SimpleMimeEntity
getMaxLineLength() Get the maximum line length of the body of this entity. Swift_Mime_SimpleMimeEntity
getNestingLevel() Always returns {@link LEVEL_TOP} for a message instance. Swift_Mime_SimpleMessage
getPriority() Get the priority of this message. Swift_Mime_SimpleMessage
getReadReceiptTo() Get the addresses to which a read-receipt will be sent. Swift_Mime_SimpleMessage
getReplyTo() Get the reply-to address of this message. Swift_Mime_SimpleMessage
getReturnPath() Get the return-path (bounce address) of this message. Swift_Mime_SimpleMessage
getSender() Get the sender of this message. Swift_Mime_SimpleMessage
getSubject() Get the subject of this message. Swift_Mime_SimpleMessage
getTo() Get the To addresses of this message. Swift_Mime_SimpleMessage
newInstance() Create a new Message. Swift_Message
setBcc() Set the Bcc addresses of this message. Swift_Mime_SimpleMessage
setBody() Set the body of this entity, either as a string, or as an instance of {@link Swift_OutputByteStream}. Swift_Mime_SimpleMimeEntity
setBoundary() Set the boundary used to separate children in this entity. Swift_Mime_SimpleMimeEntity
setCc() Set the Cc addresses of this message. Swift_Mime_SimpleMessage
setCharset() Set the character set of this entity. Swift_Mime_MimePart
setChildren() Set all children of this entity. Swift_Mime_SimpleMimeEntity
setContentType() Set the Content-type of this entity. Swift_Mime_SimpleMimeEntity
setDate() Set the date at which this message was created. Swift_Mime_SimpleMessage
setDelSp() Turn delsp on or off for this entity. Swift_Mime_MimePart
setDescription() Set the description of this entity. Swift_Mime_SimpleMimeEntity
setEncoder() Set the encoder used for the body of this entity. Swift_Mime_SimpleMimeEntity
setFormat() Set the format of this entity (flowed or fixed). Swift_Mime_MimePart
setFrom() Set the from address of this message. Swift_Mime_SimpleMessage
setId() Set the CID of this entity. Swift_Mime_SimpleMimeEntity
setMaxLineLength() Set the maximum line length of lines in this body. Swift_Mime_SimpleMimeEntity
setPriority() Set the priority of this message. Swift_Mime_SimpleMessage
setReadReceiptTo() Ask for a delivery receipt from the recipient to be sent to $addresses. Swift_Mime_SimpleMessage
setReplyTo() Set the reply-to address of this message. Swift_Mime_SimpleMessage
setReturnPath() Set the return-path (the bounce address) of this message. Swift_Mime_SimpleMessage
setSender() Set the sender of this message. Swift_Mime_SimpleMessage
setSubject() Set the subject of this message. Swift_Mime_SimpleMessage
setTo() Set the to addresses of this message. Swift_Mime_SimpleMessage
toByteStream() Write this message to a {@link Swift_InputByteStream}. Swift_Message
toString() Get this message as a complete string. Swift_Message

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
_becomeMimePart() Turn the body of this message into a child of itself if needed Swift_Mime_SimpleMessage
_bodyToByteStream() Write this entire entity to a {@link Swift_InputByteStream}. Swift_Mime_SimpleMimeEntity
_bodyToString() Get this entire entity as a string. Swift_Mime_SimpleMimeEntity
_clearCache() Empty the KeyCache for this entity. Swift_Mime_SimpleMimeEntity
_convertString() Encode charset when charset is not utf-8 Swift_Mime_MimePart
_fixHeaders() Re-evaluate what content type and encoding should be used on this entity. Swift_Mime_SimpleMimeEntity
_getCache() Get the KeyCache used in this entity. Swift_Mime_SimpleMimeEntity
_getGrammar() Get the grammar used for validation. Swift_Mime_SimpleMimeEntity
_getHeaderFieldModel() Get the model data (usually an array or a string) for $field. Swift_Mime_SimpleMimeEntity
_getHeaderParameter() Get the parameter value of $parameter on $field header. Swift_Mime_SimpleMimeEntity
_getIdField() Swift_Mime_SimpleMessage
_setHeaderFieldModel() Set the model data for $field. Swift_Mime_SimpleMimeEntity
_setHeaderParameter() Set the parameter value of $parameter on $field header. Swift_Mime_SimpleMimeEntity
_setNestingLevel() Set the nesting level of this entity Swift_Mime_MimePart
doSign() Loops through signers and apply the signatures. Swift_Message
getRandomId() Returns a random Content-ID or Message-ID. Swift_Mime_SimpleMimeEntity
restoreHeaders() Remove or restore altered headers. Swift_Message
restoreMessage() Restore message body. Swift_Message
saveHeaders() Save the original headers. Swift_Message
saveMessage() Save the message before any signature is applied. Swift_Message

Method Details

__clone() public method

Clone Message Signers.

See also Swift_Mime_SimpleMimeEntity::__clone().

public void __clone ( )
__construct() public method

Create a new Message.

Details may be optionally passed into the constructor.

public void __construct ( $subject null, $body null, $contentType null, $charset null )
$subject string
$body string
$contentType string
$charset string
__wakeup() public method

public void __wakeup ( )
addPart() public method

Add a MimePart to this Message.

public Swift_Mime_SimpleMessage addPart ( $body, $contentType null, $charset null )
$body string|Swift_OutputByteStream
$contentType string
$charset string
attachSigner() public method

Attach a new signature handler to the message.

public Swift_Message attachSigner ( Swift_Signer $signer )
$signer Swift_Signer
detachSigner() public method

Attach a new signature handler to the message.

public Swift_Message detachSigner ( Swift_Signer $signer )
$signer Swift_Signer
doSign() protected method

Loops through signers and apply the signatures.

protected void doSign ( )
newInstance() public static method

Create a new Message.

public static Swift_Message newInstance ( $subject null, $body null, $contentType null, $charset null )
$subject string
$body string
$contentType string
$charset string
restoreHeaders() protected method

Remove or restore altered headers.

protected void restoreHeaders ( )
restoreMessage() protected method

Restore message body.

protected void restoreMessage ( )
saveHeaders() protected method

Save the original headers.

protected void saveHeaders ( array $altered )
$altered array
saveMessage() protected method

Save the message before any signature is applied.

protected void saveMessage ( )
toByteStream() public method

Write this message to a {@link Swift_InputByteStream}.

public void toByteStream ( Swift_InputByteStream $is )
$is Swift_InputByteStream
toString() public method

Get this message as a complete string.

public string toString ( )