Class Swift_Message

Description

Swift Message class

Located in /Swift/Message.php (line 26)

Swift_Message_Mime
   |
   --Swift_Message
Class Constant Summary
Method Summary
Swift_Message __construct ([ $subject = ""], [ $body = null], [ $type = "text/plain"], [ $encoding = null], [ $charset = null])
string attach (Swift_Message_Mime $child, [string $id = null])
void detach (string $id)
void fixContentType ()
array getBcc ()
mixed getBody ()
array getCc ()
string getCharset ()
string getDate ()
string getFrom ()
string getMimeWarning ()
int getPriority ()
array getReplyTo ()
string getReturnPath ([boolean $smtp = false])
string getSubject ()
array getTo ()
boolean isFlowed ()
void moveBranchIn (string $type, string $nested_type, array $from, string $old_branch, string $new_branch, string $tag)
void moveBranchOut (array $from, string $old_branch, string $new_branch, string $tag)
void preBuild ()
void requestReadReceipt (string $request)
void setBcc (mixed $bcc)
void setBody (mixed $body)
void setCc (mixed $cc)
void setCharset (string $charset)
void setDate (int $date)
void setFlowed ([boolean $flowed = true])
void setFrom (string $from)
void setMimeWarning ( $text)
void setPriority (int $priority)
void setReplyTo (mixed $replyto)
void setReturnPath (string $address)
void setSubject (string $subject)
void setTo (mixed $to)
boolean wantsReadReceipt ()
Methods
Constructor __construct (line 70)

List of references for all related parts

Swift_Message __construct ([ $subject = ""], [ $body = null], [ $type = "text/plain"], [ $encoding = null], [ $charset = null])
  • $subject
  • $body
  • $type
  • $encoding
  • $charset

Redefinition of:
Swift_Message_Mime::__construct()
Constructor
attach (line 433)

Attach a mime part or an attachment of some sort

Any descendant of Swift_Message_Mime can be added safely (including other Swift_Message objects for mail forwarding!!)

  • return: The identifier for the part
string attach (Swift_Message_Mime $child, [string $id = null])
  • Swift_Message_Mime $child: The document to attach
  • string $id: An identifier to use (one is returned otherwise)
detach (line 466)

Remove a nested MIME part

  • throws: Swift_Message_MimeException If no such part exists
void detach (string $id)
  • string $id: The ID of the attached part
fixContentType (line 497)

Sets the correct content type header by looking at what types of data we have set

void fixContentType ()
getBcc (line 264)

Return the list of recipients in the Bcc: header

array getBcc ()
getBody (line 406)

Alias for getData()

  • return: The document body
mixed getBody ()
getCc (line 235)

Return the list of recipients in the Cc: header

array getCc ()
getCharset (line 319)

Get the charset used in the document

Returns null if none is set

string getCharset ()
getDate (line 301)

Get the date as it looks in the headers

string getDate ()
getFrom (line 153)

Get the address used in the From: header

string getFrom ()
getMimeWarning (line 422)

Get the MIME warning which is displayed to old clients

string getMimeWarning ()
getPriority (line 389)

Get the current message priority

Returns NULL if none set

int getPriority ()
getReplyTo (line 206)

Return the list of recipients in the Reply-To: header

array getReplyTo ()
getReturnPath (line 127)

Return the address used in the Return-Path: header

string getReturnPath ([boolean $smtp = false])
  • boolean $smtp: Return the address for SMTP command
getSubject (line 285)

Get the current subject used in the headers

string getSubject ()
getTo (line 177)

Return the list of recipients in the To: header

array getTo ()
isFlowed (line 344)

Check if the message format is set as flowed

boolean isFlowed ()
moveBranchIn (line 512)

Move a branch of the tree, containing all it's MIME parts onto another branch

void moveBranchIn (string $type, string $nested_type, array $from, string $old_branch, string $new_branch, string $tag)
  • string $type: The content type on the branch itself
  • string $nested_type: The content type which may exist in the branch's parent
  • array $from: The array containing all the nodes presently
  • string $old_branch: The location of the branch now
  • string $new_branch: The location of the branch after moving
  • string $tag: The key to identify the branch by in it's new location
moveBranchOut (line 592)

Move a branch further toward the top of the tree

void moveBranchOut (array $from, string $old_branch, string $new_branch, string $tag)
  • array $from: The array containing MIME parts from the old branch
  • string $old_branch: The name of the old branch
  • string $new_branch: The name of the new branch
  • string $tag: The key of the branch being moved
postAttachFixStructure (line 546)

Analyzes the mixing of MIME types in a mulitpart message an re-arranges if needed

It looks complicated and long winded but the concept is pretty simple, even if putting it in code does me make want to cry!

void postAttachFixStructure ()
postDetachFixStructure (line 623)

Analyzes the mixing of MIME types in a mulitpart message an re-arranges if needed

It looks complicated and long winded but the concept is pretty simple, even if putting it in code does me make want to cry!

void postDetachFixStructure ()
preBuild (line 676)

Execute needed logic prior to compilation

void preBuild ()

Redefinition of:
Swift_Message_Mime::preBuild()
Execute any logic needed prior to building
requestReadReceipt (line 370)

Request that the client send back a read-receipt (don't rely on this!)

void requestReadReceipt (string $request)
  • string $request: Request address
setBcc (line 248)

Set the list of recipients in the Bcc: header

void setBcc (mixed $bcc)
  • mixed $bcc: An array or a string
setBody (line 398)

Alias for setData()

void setBody (mixed $body)
  • mixed $body: Body
setCc (line 219)

Set the list of recipients in the Cc: header

void setCc (mixed $cc)
  • mixed $cc: An array or a string
setCharset (line 309)

Set the charset of the document

void setCharset (string $charset)
  • string $charset: The charset used
setDate (line 293)

Set the date in the headers in RFC 2822 format

void setDate (int $date)
  • int $date: The time as a UNIX timestamp
setFlowed (line 334)

Set the "format" attribute to flowed

void setFlowed ([boolean $flowed = true])
  • boolean $flowed: On or Off
setFrom (line 144)

Set the address in the From: header

void setFrom (string $from)
  • string $from: The address to set as From
setMimeWarning (line 414)

Set the MIME warning message which is displayed to old clients

  • var: The full warning message (in 7bit ascii)
void setMimeWarning ( $text)
  • $text
setPriority (line 357)

Set the message prioirty in the mail client (don't rely on this)

void setPriority (int $priority)
  • int $priority: The priority as a value between 1 (high) and 5 (low)
setReplyTo (line 190)

Set the list of recipients in the Reply-To: header

void setReplyTo (mixed $replyto)
  • mixed $replyto: An array or a string
setReturnPath (line 117)

Set the address in the Return-Path: header

void setReturnPath (string $address)
  • string $address: The bounce-detect address
setSubject (line 277)

Set the subject in the headers

void setSubject (string $subject)
  • string $subject: The subject of the email
setTo (line 161)

Set the list of recipients in the To: header

void setTo (mixed $to)
  • mixed $to: An array or a string
wantsReadReceipt (line 380)

Check if a read receipt has been requested for this message

boolean wantsReadReceipt ()

Inherited Methods

Inherited From Swift_Message_Mime

Swift_Message_Mime::__construct()
Swift_Message_Mime::addChild()
Swift_Message_Mime::build()
Swift_Message_Mime::buildData()
Swift_Message_Mime::getChild()
Swift_Message_Mime::getContentType()
Swift_Message_Mime::getData()
Swift_Message_Mime::getEncoding()
Swift_Message_Mime::getLE()
Swift_Message_Mime::getLevel()
Swift_Message_Mime::hasChild()
Swift_Message_Mime::listChildren()
Swift_Message_Mime::numChildren()
Swift_Message_Mime::preBuild()
Swift_Message_Mime::removeChild()
Swift_Message_Mime::setContentType()
Swift_Message_Mime::setData()
Swift_Message_Mime::setEncoding()
Swift_Message_Mime::setHeaders()
Swift_Message_Mime::setLE()
Swift_Message_Mime::setLevel()
Swift_Message_Mime::setLineWrap()
Swift_Message_Mime::uncacheAll()
Class Constants
PRIORITY_HIGH = 1 (line 35)

Constant from a high priority message (pretty meaningless)

PRIORITY_LOW = 5 (line 39)

Constant for a low priority message

PRIORITY_NORMAL = 3 (line 43)

Constant for a normal priority message

VERSION = "3.0.4" (line 31)

The version of this library

Inherited Constants

Inherited from Swift_Message_Mime

Swift_Message_Mime::HTML
Swift_Message_Mime::MISC
Swift_Message_Mime::PLAIN
Swift_Message_Mime::SAFE_LENGTH
Swift_Message_Mime::VERY_SAFE_LENGTH

Documentation generated on Tue, 06 Mar 2007 23:32:25 +0000 by phpDocumentor 1.3.1