TYPO3  7.6
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
Swift_Mime_SimpleMessage Class Reference
Inheritance diagram for Swift_Mime_SimpleMessage:
Swift_Mime_MimePart Swift_Mime_Message Swift_Mime_SimpleMimeEntity Swift_Mime_MimeEntity Swift_Mime_MimeEntity Swift_Mime_CharsetObserver Swift_Mime_EncodingObserver Swift_Mime_CharsetObserver Swift_Mime_EncodingObserver Swift_Message Swift_SignedMessage MailMessage

Public Member Functions

 __construct (Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar, $charset=null)
 
 getNestingLevel ()
 
 setSubject ($subject)
 
 getSubject ()
 
 setDate ($date)
 
 getDate ()
 
 setReturnPath ($address)
 
 getReturnPath ()
 
 setSender ($address, $name=null)
 
 getSender ()
 
 addFrom ($address, $name=null)
 
 setFrom ($addresses, $name=null)
 
 getFrom ()
 
 addReplyTo ($address, $name=null)
 
 setReplyTo ($addresses, $name=null)
 
 getReplyTo ()
 
 addTo ($address, $name=null)
 
 setTo ($addresses, $name=null)
 
 getTo ()
 
 addCc ($address, $name=null)
 
 setCc ($addresses, $name=null)
 
 getCc ()
 
 addBcc ($address, $name=null)
 
 setBcc ($addresses, $name=null)
 
 getBcc ()
 
 setPriority ($priority)
 
 getPriority ()
 
 setReadReceiptTo ($addresses)
 
 getReadReceiptTo ()
 
 attach (Swift_Mime_MimeEntity $entity)
 
 detach (Swift_Mime_MimeEntity $entity)
 
 embed (Swift_Mime_MimeEntity $entity)
 
 toString ()
 
 __toString ()
 
 toByteStream (Swift_InputByteStream $is)
 
- Public Member Functions inherited from Swift_Mime_MimePart
 __construct (Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar, $charset=null)
 
 setBody ($body, $contentType=null, $charset=null)
 
 getCharset ()
 
 setCharset ($charset)
 
 getFormat ()
 
 setFormat ($format)
 
 getDelSp ()
 
 setDelSp ($delsp=true)
 
 getNestingLevel ()
 
 charsetChanged ($charset)
 
- Public Member Functions inherited from Swift_Mime_SimpleMimeEntity
 __construct (Swift_Mime_HeaderSet $headers, Swift_Mime_ContentEncoder $encoder, Swift_KeyCache $cache, Swift_Mime_Grammar $grammar)
 
 generateId ()
 
 getHeaders ()
 
 getNestingLevel ()
 
 getContentType ()
 
 setContentType ($type)
 
 getId ()
 
 setId ($id)
 
 getDescription ()
 
 setDescription ($description)
 
 getMaxLineLength ()
 
 setMaxLineLength ($length)
 
 getChildren ()
 
 setChildren (array $children, $compoundLevel=null)
 
 getBody ()
 
 setBody ($body, $contentType=null)
 
 getEncoder ()
 
 setEncoder (Swift_Mime_ContentEncoder $encoder)
 
 getBoundary ()
 
 setBoundary ($boundary)
 
 charsetChanged ($charset)
 
 encoderChanged (Swift_Mime_ContentEncoder $encoder)
 
 toString ()
 
 __toString ()
 
 toByteStream (Swift_InputByteStream $is)
 
 __destruct ()
 
 __clone ()
 
- Public Member Functions inherited from Swift_Mime_MimeEntity
 setChildren (array $children)
 
- Public Member Functions inherited from Swift_Mime_Message
 generateId ()
 

Protected Member Functions

 _getIdField ()
 
 _becomeMimePart ()
 
- Protected Member Functions inherited from Swift_Mime_MimePart
 _fixHeaders ()
 
 _setNestingLevel ($level)
 
 _convertString ($string)
 
- Protected Member Functions inherited from Swift_Mime_SimpleMimeEntity
 _bodyToString ()
 
 _bodyToByteStream (Swift_InputByteStream $is)
 
 _getIdField ()
 
 _getHeaderFieldModel ($field)
 
 _setHeaderFieldModel ($field, $model)
 
 _getHeaderParameter ($field, $parameter)
 
 _setHeaderParameter ($field, $parameter, $value)
 
 _fixHeaders ()
 
 _getCache ()
 
 _getGrammar ()
 
 _clearCache ()
 
 getRandomId ()
 

Private Member Functions

 _getTopNestingLevel ()
 

Additional Inherited Members

- Public Attributes inherited from Swift_Mime_MimeEntity
const LEVEL_TOP = 16
 
const LEVEL_MIXED = 256
 
const LEVEL_ALTERNATIVE = 4096
 
const LEVEL_RELATED = 65536
 
- Protected Attributes inherited from Swift_Mime_MimePart
 $_userFormat
 
 $_userCharset
 
 $_userDelSp
 

Detailed Description

The default email message class.

Author
Chris Corbyn

Definition at line 16 of file SimpleMessage.php.

Constructor & Destructor Documentation

__construct ( Swift_Mime_HeaderSet  $headers,
Swift_Mime_ContentEncoder  $encoder,
Swift_KeyCache  $cache,
Swift_Mime_Grammar  $grammar,
  $charset = null 
)

Create a new SimpleMessage with $headers, $encoder and $cache.

Parameters
Swift_Mime_HeaderSet$headers
Swift_Mime_ContentEncoder$encoder
Swift_KeyCache$cache
Swift_Mime_Grammar$grammar
string$charset

Definition at line 27 of file SimpleMessage.php.

References Swift_Mime_MimeEntity\getHeaders(), Swift_Mime_MimeEntity\getId(), setDate(), and Swift_Mime_SimpleMimeEntity\setId().

Member Function Documentation

__toString ( )

Returns a string representation of this object.

See Also
toString()
Returns
string

Definition at line 594 of file SimpleMessage.php.

References toString().

_becomeMimePart ( )
protected
_getIdField ( )
protected
_getTopNestingLevel ( )
private

Get the highest nesting level nested inside this message

Definition at line 637 of file SimpleMessage.php.

References Swift_Mime_MimeEntity\getChildren(), and getNestingLevel().

Referenced by _becomeMimePart().

addBcc (   $address,
  $name = null 
)

Add a Bcc: address to this message.

If $name is passed this name will be associated with the address.

Parameters
string$address
string$nameoptional
Returns
Swift_Mime_SimpleMessage

Definition at line 401 of file SimpleMessage.php.

References getBcc(), and setBcc().

addCc (   $address,
  $name = null 
)

Add a Cc: address to this message.

If $name is passed this name will be associated with the address.

Parameters
string$address
string$nameoptional
Returns
Swift_Mime_SimpleMessage

Definition at line 349 of file SimpleMessage.php.

References getCc(), and setCc().

addFrom (   $address,
  $name = null 
)

Add a From: address to this message.

If $name is passed this name will be associated with the address.

Parameters
string$address
string$nameoptional
Returns
Swift_Mime_SimpleMessage

Definition at line 186 of file SimpleMessage.php.

References getFrom(), and setFrom().

addReplyTo (   $address,
  $name = null 
)

Add a Reply-To: address to this message.

If $name is passed this name will be associated with the address.

Parameters
string$address
string$nameoptional
Returns
Swift_Mime_SimpleMessage

Definition at line 240 of file SimpleMessage.php.

References getReplyTo(), and setReplyTo().

addTo (   $address,
  $name = null 
)

Add a To: address to this message.

If $name is passed this name will be associated with the address.

Parameters
string$address
string$nameoptional
Returns
Swift_Mime_SimpleMessage

Definition at line 294 of file SimpleMessage.php.

References getTo(), and setTo().

attach ( Swift_Mime_MimeEntity  $entity)

Attach a Swift_Mime_MimeEntity such as an Attachment or MimePart.

Parameters
Swift_Mime_MimeEntity$entity
Returns
Swift_Mime_SimpleMessage

Definition at line 527 of file SimpleMessage.php.

References Swift_Mime_MimeEntity\getChildren(), and Swift_Mime_MimeEntity\setChildren().

Referenced by Swift_Message\addPart(), and embed().

detach ( Swift_Mime_MimeEntity  $entity)

Remove an already attached entity.

Parameters
Swift_Mime_MimeEntity$entity
Returns
Swift_Mime_SimpleMessage

Definition at line 541 of file SimpleMessage.php.

References Swift_Mime_MimeEntity\getChildren(), and Swift_Mime_MimeEntity\setChildren().

embed ( Swift_Mime_MimeEntity  $entity)

Attach a Swift_Mime_MimeEntity and return it's CID source. This method should be used when embedding images or other data in a message.

Parameters
Swift_Mime_MimeEntity$entity
Returns
string

Definition at line 562 of file SimpleMessage.php.

References attach().

getBcc ( )

Get the Bcc addresses of this message.

Returns
array

Implements Swift_Mime_Message.

Definition at line 438 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderFieldModel().

Referenced by addBcc().

getCc ( )

Get the Cc address of this message.

Returns
array

Implements Swift_Mime_Message.

Definition at line 386 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderFieldModel().

Referenced by addCc().

getDate ( )

Get the date at which this message was created.

Returns
int

Implements Swift_Mime_Message.

Definition at line 112 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderFieldModel().

getFrom ( )

Get the from address of this message.

Returns
mixed

Implements Swift_Mime_Message.

Definition at line 225 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderFieldModel().

Referenced by addFrom().

getNestingLevel ( )

Always returns LEVEL_TOP for a message instance.

Returns
int

Implements Swift_Mime_MimeEntity.

Definition at line 60 of file SimpleMessage.php.

Referenced by _getTopNestingLevel().

getPriority ( )

Get the priority of this message.

The returned value is an integer where 1 is the highest priority and 5 is the lowest.

Returns
int

Definition at line 484 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderFieldModel().

getReadReceiptTo ( )

Get the addresses to which a read-receipt will be sent.

Returns
string

Definition at line 515 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderFieldModel().

getReplyTo ( )

Get the reply-to address of this message.

Returns
string

Implements Swift_Mime_Message.

Definition at line 279 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderFieldModel().

Referenced by addReplyTo().

getReturnPath ( )

Get the return-path (bounce address) of this message.

Returns
string

Implements Swift_Mime_Message.

Definition at line 138 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderFieldModel().

getSender ( )

Get the sender of this message.

Returns
string

Implements Swift_Mime_Message.

Definition at line 171 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderFieldModel().

getSubject ( )

Get the subject of this message.

Returns
string

Implements Swift_Mime_Message.

Definition at line 86 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderFieldModel().

getTo ( )

Get the To addresses of this message.

Returns
array

Implements Swift_Mime_Message.

Definition at line 334 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_getHeaderFieldModel().

Referenced by addTo().

setBcc (   $addresses,
  $name = null 
)

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.

Parameters
mixed$addresses
string$nameoptional
Returns
Swift_Mime_SimpleMessage

Implements Swift_Mime_Message.

Definition at line 420 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderFieldModel(), and Swift_Mime_MimeEntity\getHeaders().

Referenced by addBcc().

setCc (   $addresses,
  $name = null 
)

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.

Parameters
mixed$addresses
string$nameoptional
Returns
Swift_Mime_SimpleMessage

Implements Swift_Mime_Message.

Definition at line 368 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderFieldModel(), and Swift_Mime_MimeEntity\getHeaders().

Referenced by addCc().

setDate (   $date)

Set the date at which this message was created.

Parameters
int$date
Returns
Swift_Mime_SimpleMessage

Implements Swift_Mime_Message.

Definition at line 98 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderFieldModel(), and Swift_Mime_MimeEntity\getHeaders().

Referenced by __construct().

setFrom (   $addresses,
  $name = null 
)

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.

Parameters
string | array$addresses
string$nameoptional
Returns
Swift_Mime_SimpleMessage

Implements Swift_Mime_Message.

Definition at line 207 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderFieldModel(), and Swift_Mime_MimeEntity\getHeaders().

Referenced by addFrom().

setPriority (   $priority)

Set the priority of this message.

The value is an integer where 1 is the highest priority and 5 is the lowest.

Parameters
int$priority
Returns
Swift_Mime_SimpleMessage

Definition at line 452 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderFieldModel(), elseif, and Swift_Mime_MimeEntity\getHeaders().

setReadReceiptTo (   $addresses)

Ask for a delivery receipt from the recipient to be sent to $addresses.

Parameters
array$addresses
Returns
Swift_Mime_SimpleMessage

Definition at line 500 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderFieldModel(), and Swift_Mime_MimeEntity\getHeaders().

setReplyTo (   $addresses,
  $name = null 
)

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.

Parameters
string$addresses
string$nameoptional
Returns
Swift_Mime_SimpleMessage

Implements Swift_Mime_Message.

Definition at line 261 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderFieldModel(), and Swift_Mime_MimeEntity\getHeaders().

Referenced by addReplyTo().

setReturnPath (   $address)

Set the return-path (the bounce address) of this message.

Parameters
string$address
Returns
Swift_Mime_SimpleMessage

Implements Swift_Mime_Message.

Definition at line 124 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderFieldModel(), and Swift_Mime_MimeEntity\getHeaders().

setSender (   $address,
  $name = null 
)

Set the sender of this message.

This does not override the From field, but it has a higher significance.

Parameters
string$address
string$nameoptional
Returns
Swift_Mime_SimpleMessage

Implements Swift_Mime_Message.

Definition at line 153 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderFieldModel(), and Swift_Mime_MimeEntity\getHeaders().

setSubject (   $subject)

Set the subject of this message.

Parameters
string$subject
Returns
Swift_Mime_SimpleMessage

Implements Swift_Mime_Message.

Definition at line 72 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderFieldModel(), and Swift_Mime_MimeEntity\getHeaders().

Referenced by Swift_Message\__construct().

setTo (   $addresses,
  $name = null 
)

Set the to addresses of this message.

If multiple recipients will receive the message an array should be used. Example: array('recei.nosp@m.ver@.nosp@m.domai.nosp@m.n.or.nosp@m.g', 'other.nosp@m.@dom.nosp@m.ain.o.nosp@m.rg' => 'A name')

If $name is passed and the first parameter is a string, this name will be associated with the address.

Parameters
mixed$addresses
string$nameoptional
Returns
Swift_Mime_SimpleMessage

Implements Swift_Mime_Message.

Definition at line 316 of file SimpleMessage.php.

References Swift_Mime_SimpleMimeEntity\_setHeaderFieldModel(), and Swift_Mime_MimeEntity\getHeaders().

Referenced by addTo().

toByteStream ( Swift_InputByteStream  $is)
toString ( )

Get this message as a complete string.

Returns
string

Implements Swift_Mime_MimeEntity.

Definition at line 574 of file SimpleMessage.php.

References _becomeMimePart(), Swift_Mime_MimeEntity\getBody(), Swift_Mime_MimeEntity\getChildren(), and Swift_Mime_MimeEntity\setChildren().

Referenced by __toString().