Class Swift_Mime_SimpleMessage
Inheritance | Swift_Mime_SimpleMessage » Swift_Mime_MimePart » Swift_Mime_SimpleMimeEntity |
---|---|
Implements | Swift_Mime_Message, Swift_Mime_MimeEntity |
Subclasses | Swift_Message, Swift_SignedMessage |
The default email message class.
Protected Properties
Property | Type | Description | Defined 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
Method | Description | Defined By |
---|---|---|
__clone() | Make a deep copy of object. | Swift_Mime_SimpleMimeEntity |
__construct() | Create a new SimpleMessage with $headers, $encoder and $cache. | Swift_Mime_SimpleMessage |
__destruct() | Empties it's own contents from the cache. | Swift_Mime_SimpleMimeEntity |
__toString() | Returns a string representation of this object. | Swift_Mime_SimpleMessage |
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 |
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 |
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 |
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 |
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_Mime_SimpleMessage |
toString() | Get this message as a complete string. | Swift_Mime_SimpleMessage |
Protected Methods
Method | Description | Defined 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 |
getRandomId() | Returns a random Content-ID or Message-ID. | Swift_Mime_SimpleMimeEntity |
Method Details
Create a new SimpleMessage with $headers, $encoder and $cache.
public void __construct ( Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar, $charset = null ) | ||
$headers | Swift_Mime_HeaderSet | |
$encoder | Swift_Mime_ContentEncoder | |
$cache | Swift_KeyCache | |
$grammar | Swift_Mime_Grammar | |
$charset | string |
Returns a string representation of this object.
See also toString().
public string __toString ( ) |
Turn the body of this message into a child of itself if needed
protected void _becomeMimePart ( ) |
protected void _getIdField ( ) |
Add a Bcc: address to this message.
If $name is passed this name will be associated with the address.
public Swift_Mime_SimpleMessage addBcc ( $address, $name = null ) | ||
$address | string | |
$name | string | Optional |
Add a Cc: address to this message.
If $name is passed this name will be associated with the address.
public Swift_Mime_SimpleMessage addCc ( $address, $name = null ) | ||
$address | string | |
$name | string | Optional |
Add a From: address to this message.
If $name is passed this name will be associated with the address.
public Swift_Mime_SimpleMessage addFrom ( $address, $name = null ) | ||
$address | string | |
$name | string | Optional |
Add a Reply-To: address to this message.
If $name is passed this name will be associated with the address.
public Swift_Mime_SimpleMessage addReplyTo ( $address, $name = null ) | ||
$address | string | |
$name | string | Optional |
Add a To: address to this message.
If $name is passed this name will be associated with the address.
public Swift_Mime_SimpleMessage addTo ( $address, $name = null ) | ||
$address | string | |
$name | string | Optional |
Attach a {@link Swift_Mime_MimeEntity} such as an Attachment or MimePart.
public Swift_Mime_SimpleMessage attach ( Swift_Mime_MimeEntity $entity ) | ||
$entity | Swift_Mime_MimeEntity |
Remove an already attached entity.
public Swift_Mime_SimpleMessage detach ( Swift_Mime_MimeEntity $entity ) | ||
$entity | Swift_Mime_MimeEntity |
Attach a {@link Swift_Mime_MimeEntity} and return it's CID source.
This method should be used when embedding images or other data in a message.
public string embed ( Swift_Mime_MimeEntity $entity ) | ||
$entity | Swift_Mime_MimeEntity |
Get the Bcc addresses of this message.
public array getBcc ( ) |
Get the Cc address of this message.
public array getCc ( ) |
Get the date at which this message was created.
public int getDate ( ) |
Get the from address of this message.
public mixed getFrom ( ) |
Always returns {@link LEVEL_TOP} for a message instance.
public int getNestingLevel ( ) |
Get the priority of this message.
The returned value is an integer where 1 is the highest priority and 5 is the lowest.
public int getPriority ( ) |
Get the addresses to which a read-receipt will be sent.
public string getReadReceiptTo ( ) |
Get the reply-to address of this message.
public string getReplyTo ( ) |
Get the return-path (bounce address) of this message.
public string getReturnPath ( ) |
Get the sender of this message.
public string getSender ( ) |
Get the subject of this message.
public string getSubject ( ) |
Get the To addresses of this message.
public array getTo ( ) |
Set the Bcc addresses of this message.
If $name is passed and the first parameter is a string, this name will be associated with the address.
public Swift_Mime_SimpleMessage setBcc ( $addresses, $name = null ) | ||
$addresses | mixed | |
$name | string | Optional |
Set the Cc addresses of this message.
If $name is passed and the first parameter is a string, this name will be associated with the address.
public Swift_Mime_SimpleMessage setCc ( $addresses, $name = null ) | ||
$addresses | mixed | |
$name | string | Optional |
Set the date at which this message was created.
public Swift_Mime_SimpleMessage setDate ( $date ) | ||
$date | int |
Set the from address of this message.
You may pass an array of addresses if this message is from multiple people.
If $name is passed and the first parameter is a string, this name will be associated with the address.
public Swift_Mime_SimpleMessage setFrom ( $addresses, $name = null ) | ||
$addresses | string|array | |
$name | string | Optional |
Set the priority of this message.
The value is an integer where 1 is the highest priority and 5 is the lowest.
public Swift_Mime_SimpleMessage setPriority ( $priority ) | ||
$priority | int |
Ask for a delivery receipt from the recipient to be sent to $addresses.
public Swift_Mime_SimpleMessage setReadReceiptTo ( $addresses ) | ||
$addresses | array |
Set the reply-to address of this message.
You may pass an array of addresses if replies will go to multiple people.
If $name is passed and the first parameter is a string, this name will be associated with the address.
public Swift_Mime_SimpleMessage setReplyTo ( $addresses, $name = null ) | ||
$addresses | string | |
$name | string | Optional |
Set the return-path (the bounce address) of this message.
public Swift_Mime_SimpleMessage setReturnPath ( $address ) | ||
$address | string |
Set the sender of this message.
This does not override the From field, but it has a higher significance.
public Swift_Mime_SimpleMessage setSender ( $address, $name = null ) | ||
$address | string | |
$name | string | Optional |
Set the subject of this message.
public Swift_Mime_SimpleMessage setSubject ( $subject ) | ||
$subject | string |
Set the to addresses of this message.
If multiple recipients will receive the message an array should be used. Example: array('receiver@domain.org', 'other@domain.org' => 'A name')
If $name is passed and the first parameter is a string, this name will be associated with the address.
public Swift_Mime_SimpleMessage setTo ( $addresses, $name = null ) | ||
$addresses | mixed | |
$name | string | Optional |
Write this message to a {@link Swift_InputByteStream}.
public void toByteStream ( Swift_InputByteStream $is ) | ||
$is | Swift_InputByteStream |
Get this message as a complete string.
public string toString ( ) |