\Swift_Message
The Message class for building emails.
- Author: Chris Corbyn
Synopsis
class Swift_Message
extends Swift_Mime_SimpleMessage
{
- // Inherited members from Swift_Mime_MimePart
- protected $_userFormat;
- protected $_userCharset;
- protected $_userDelSp;
- // Inherited members from Swift_Mime_SimpleMimeEntity
- protected $_userContentType;
- // methods
- public void __construct()
- public static Swift_Message newInstance()
- public Swift_Mime_SimpleMessage addPart()
- public void __wakeup()
- // Inherited methods from Swift_Mime_SimpleMessage
- public void __construct()
- public int getNestingLevel()
- public Swift_Mime_SimpleMessage setSubject()
- public string getSubject()
- public Swift_Mime_SimpleMessage setDate()
- public integer getDate()
- public Swift_Mime_SimpleMessage setReturnPath()
- public string getReturnPath()
- public Swift_Mime_SimpleMessage setSender()
- public string getSender()
- public Swift_Mime_SimpleMessage addFrom()
- public Swift_Mime_SimpleMessage setFrom()
- public string getFrom()
- public Swift_Mime_SimpleMessage addReplyTo()
- public Swift_Mime_SimpleMessage setReplyTo()
- public string getReplyTo()
- public Swift_Mime_SimpleMessage addTo()
- public Swift_Mime_SimpleMessage setTo()
- public array getTo()
- public Swift_Mime_SimpleMessage addCc()
- public Swift_Mime_SimpleMessage setCc()
- public array getCc()
- public Swift_Mime_SimpleMessage addBcc()
- public Swift_Mime_SimpleMessage setBcc()
- public array getBcc()
- public Swift_Mime_SimpleMessage setPriority()
- public integer getPriority()
- public Swift_Mime_SimpleMessage setReadReceiptTo()
- public string getReadReceiptTo()
- public Swift_Mime_SimpleMessage attach()
- public Swift_Mime_SimpleMessage detach()
- public string embed()
- public string toString()
- public string __toString()
- public void toByteStream()
- protected void _getIdField()
- protected void _becomeMimePart()
- // Inherited methods from Swift_Mime_MimePart
- public void __construct()
- public Swift_Mime_MimePart setBody()
- public string getCharset()
- public Swift_Mime_MimePart setCharset()
- public string getFormat()
- public Swift_Mime_MimePart setFormat()
- public boolean getDelSp()
- public Swift_Mime_MimePart setDelSp()
- public int getNestingLevel()
- public void charsetChanged()
- protected void _fixHeaders()
- protected void _setNestingLevel()
- protected void _convertString()
- // Inherited methods from Swift_Mime_SimpleMimeEntity
- public void __construct()
- public string generateId()
- public Swift_Mime_HeaderSet getHeaders()
- public integer getNestingLevel()
- public string getContentType()
- public Swift_Mime_SimpleMimeEntity setContentType()
- public string getId()
- public Swift_Mime_SimpleMimeEntity setId()
- public string getDescription()
- public Swift_Mime_SimpleMimeEntity setDescription()
- public integer getMaxLineLength()
- public Swift_Mime_SimpleMimeEntity setMaxLineLength()
- public array getChildren()
- public Swift_Mime_SimpleMimeEntity setChildren()
- public string getBody()
- public Swift_Mime_SimpleMimeEntity setBody()
- public Swift_Mime_ContentEncoder getEncoder()
- public Swift_Mime_SimpleMimeEntity setEncoder()
- public string getBoundary()
- public Swift_Mime_SimpleMimeEntity setBoundary()
- public void charsetChanged()
- public void encoderChanged()
- public string toString()
- protected string _bodyToString()
- public string __toString()
- public void toByteStream()
- protected void _bodyToByteStream()
- protected void _getIdField()
- protected void _getHeaderFieldModel()
- protected void _setHeaderFieldModel()
- protected void _getHeaderParameter()
- protected void _setHeaderParameter()
- protected void _fixHeaders()
- protected Swift_KeyCache _getCache()
- protected Swift_Mime_Grammar _getGrammar()
- protected void _clearCache()
- protected string getRandomId()
- public void __destruct()
Hierarchy
Tasks
Line | Task |
---|---|
283 | Try to refactor this logic |
Constants
Name | Value |
---|---|
LEVEL_TOP | 16 |
LEVEL_MIXED | 256 |
LEVEL_ALTERNATIVE | 4096 |
LEVEL_RELATED | 65536 |
Members
protected
-
$_userCharset
The charset last specified by the user - $_userContentType
-
$_userDelSp
The delsp parameter last specified by the user -
$_userFormat
The format parameter last specified by the user
Methods
public
- __construct() — Create a new Message.
- __wakeup()
- addPart() — Add a MimePart to this Message.
- newInstance() — Create a new Message.
Inherited from Swift_Mime_SimpleMessage
protected
- _becomeMimePart() — Turn the body of this message into a child of itself if needed
- _getIdField()
public
- __toString() — Returns a string representation of this object.
- addBcc() — Add a Bcc: address to this message.
- addCc() — Add a Cc: address to this message.
- addFrom() — Add a From: address to this message.
- addReplyTo() — Add a Reply-To: address to this message.
- addTo() — Add a To: address to this message.
- attach() — Attach a {@link Swift_Mime_MimeEntity} such as an Attachment or MimePart.
- detach() — Remove an already attached entity.
- embed() — Attach a {@link Swift_Mime_MimeEntity} and return it's CID source.
- getBcc() — Get the Bcc addresses of this message.
- getCc() — Get the Cc address of this message.
- getDate() — Get the date at which this message was created.
- getFrom() — Get the from address of this message.
- getNestingLevel() — Always returns {@link LEVEL_TOP} for a message instance.
- getPriority() — Get the priority of this message.
- getReadReceiptTo() — Get the addresses to which a read-receipt will be sent.
- getReplyTo() — Get the reply-to address of this message.
- getReturnPath() — Get the return-path (bounce address) of this message.
- getSender() — Get the sender of this message.
- getSubject() — Get the subject of this message.
- getTo() — Get the To addresses of this message.
- setBcc() — Set the Bcc addresses of this message.
- setCc() — Set the Cc addresses of this message.
- setDate() — Set the date at which this message was created.
- setFrom() — Set the from address of this message.
- setPriority() — Set the priority of this message.
- setReadReceiptTo() — Ask for a delivery receipt from the recipient to be sent to $addresses
- setReplyTo() — Set the reply-to address of this message.
- setReturnPath() — Set the return-path (the bounce address) of this message.
- setSender() — Set the sender of this message.
- setSubject() — Set the subject of this message.
- setTo() — Set the to addresses of this message.
- toByteStream() — Write this message to a {@link Swift_InputByteStream}.
- toString() — Get this message as a complete string.
Inherited from Swift_Mime_MimePart
protected
- _convertString() — Encode charset when charset is not utf-8
- _fixHeaders() — Fix the content-type and encoding of this entity
- _setNestingLevel() — Set the nesting level of this entity
public
- charsetChanged() — Receive notification that the charset has changed on this document, or a parent document.
- getCharset() — Get the character set of this entity.
- getDelSp() — Test if delsp is being used for this entity.
- getFormat() — Get the format of this entity (i.e. flowed or fixed).
- getNestingLevel() — Get the nesting level of this entity.
- setBody() — Set the body of this entity, either as a string, or as an instance of {@link Swift_OutputByteStream}.
- setCharset() — Set the character set of this entity.
- setDelSp() — Turn delsp on or off for this entity.
- setFormat() — Set the format of this entity (flowed or fixed).
Inherited from Swift_Mime_SimpleMimeEntity
protected
- _bodyToByteStream() — Write this entire entity to a {@link Swift_InputByteStream}.
- _bodyToString() — Get this entire entity as a string.
- _clearCache() — Empty the KeyCache for this entity.
- _fixHeaders() — Re-evaluate what content type and encoding should be used on this entity.
- _getCache() — Get the KeyCache used in this entity.
- _getGrammar() — Get the grammar used for validation.
- _getHeaderFieldModel() — Get the model data (usually an array or a string) for $field.
- _getHeaderParameter() — Get the parameter value of $parameter on $field header.
- _getIdField() — Get the name of the header that provides the ID of this entity
- _setHeaderFieldModel() — Set the model data for $field.
- _setHeaderParameter() — Set the parameter value of $parameter on $field header.
- getRandomId() — Returns a random Content-ID or Message-ID.
public
- __toString() — Returns a string representation of this object.
- charsetChanged() — Receive notification that the charset of this entity, or a parent entity has changed.
- encoderChanged() — Receive notification that the encoder of this entity or a parent entity has changed.
- generateId() — Generate a new Content-ID or Message-ID for this MIME entity.
- getBody() — Get the body of this entity as a string.
- getBoundary() — Get the boundary used to separate children in this entity.
- getChildren() — Get all children added to this entity.
- getContentType() — Get the Content-type of this entity.
- getDescription() — Get the description of this entity.
- getEncoder() — Get the encoder used for the body of this entity.
- getHeaders() — Get the {@link Swift_Mime_HeaderSet} for this entity.
- getId() — Get the CID of this entity.
- getMaxLineLength() — Get the maximum line length of the body of this entity.
- getNestingLevel() — Get the nesting level of this entity.
- setBody() — Set the body of this entity, either as a string, or as an instance of {@link Swift_OutputByteStream}.
- setBoundary() — Set the boundary used to separate children in this entity.
- setChildren() — Set all children of this entity.
- setContentType() — Set the Content-type of this entity.
- setDescription() — Set the description of this entity.
- setEncoder() — Set the encoder used for the body of this entity.
- setId() — Set the CID of this entity.
- setMaxLineLength() — Set the maximum line length of lines in this body.
- toByteStream() — Write this entire entity to a {@see Swift_InputByteStream}.
- toString() — Get this entire entity as a string.