Class Gadget_Mail_Message

Description

Gadget_Mail_Message

Mail message facility.

  • since: 1.0

Located in /Gadget/Mail/Message.php (line 29)


	
			
Variable Summary
mixed $attachments
mixed $bcc
mixed $body
mixed $cc
mixed $date
mixed $flags
mixed $from
mixed $inReplyTo
mixed $isHtml
mixed $isPlain
mixed $isSigned
mixed $messageId
mixed $references
mixed $replyTo
mixed $returnPath
mixed $sender
mixed $signature
mixed $subject
mixed $to
mixed $udate
Method Summary
bool addAddress (string $type, string $address, [string $defaultHost = 'localhost'])
string decode (string $data, int $encoding)
void extract (object $struct, [mixed $id = ''])
void extractAttachment (object $struct, string $id)
void extractMultipart (object $struct, string $id)
void extractText (object $struct, string $id)
object Gadget_Mail_Message &fetch (resource $connection, int $message)
bool flagAnswered ()
string getAddress (string $type, [string $defaultHost = 'localhost'])
string|int getArrivalDate ([mixed $unix = false])
string getBody ()
string getDate ()
string getFlag (mixed $type)
string getPlainBody ()
string getSentDate ()
string getSubject ()
bool isNew ()
bool setDate (int|string $date)
void toString ([mixed $force_new_date = false])
string typeToString (int $p, string $s)
Variables
mixed $attachments = array() (line 41)
mixed $bcc = array() (line 54)
mixed $body = array() (line 36)
mixed $cc = array() (line 53)
mixed $date (line 43)
mixed $flags = array(
'recent' => ' ',
'unseen' => ' ',
'answered' => ' ',
'deleted' => ' ',
'draft' => ' ',
'flagged' => ' '
)
(line 59)
mixed $from = array() (line 52)
mixed $imapConnection (line 31)
mixed $imapMessageId (line 32)
mixed $inReplyTo (line 49)
mixed $isHtml = false (line 34)
mixed $isPlain = false (line 35)
mixed $isSigned = false (line 38)
mixed $messageId (line 47)
mixed $references (line 48)
mixed $replyTo = array() (line 56)
mixed $returnPath = array() (line 57)
mixed $sender = array() (line 55)
mixed $signature = array() (line 39)
mixed $subject (line 46)
mixed $to = array() (line 51)
mixed $udate (line 44)
Methods
addAddress (line 128)

Add an Address

Add an address to either of To, From, CC, BCC, Sender, ReplyTo and ReturnPath headers.

  • access: public
bool addAddress (string $type, string $address, [string $defaultHost = 'localhost'])
  • string $type: header name
  • string $address: address to add
  • string $defaultHost
decode (line 637)

Decode

  • access: protected
string decode (string $data, int $encoding)
  • string $data
  • int $encoding
extract (line 463)

Extracts IMAP Messages handling Text, Multipart & Attachments

  • access: protected
void extract (object $struct, [mixed $id = ''])
  • object $struct
extractAttachment (line 496)

Extracts an Attachment of an IMAP Multipart Message

  • access: protected
void extractAttachment (object $struct, string $id)
  • object $struct
  • string $id
extractMultipart (line 555)

Attempts to extract the SubParts of an IMAP Multipart Message

  • access: protected
void extractMultipart (object $struct, string $id)
  • object $struct
  • string $id
extractText (line 588)

Extracts the actual Message from the IMAP Structure

  • access: protected
void extractText (object $struct, string $id)
  • object $struct
  • string $id
fetch (line 77)

Get an IMAP Message

  • access: public
  • static:
object Gadget_Mail_Message &fetch (resource $connection, int $message)
  • resource $connection
  • int $message
flagAnswered (line 451)

Flag the Message as Answered

  • access: public
bool flagAnswered ()
getAddress (line 171)

Get Addresses

Get a pretty printed list either of To, From, CC, BCC, Sender, ReplyTo or ReturnPath header. (Foo Bar <foo@bar.com>, bar@$defaultHost)

  • access: public
string getAddress (string $type, [string $defaultHost = 'localhost'])
  • string $type: header name
  • string $defaultHost
getArrivalDate (line 250)

Get Date when Message arrived

  • access: public
string|int getArrivalDate ([mixed $unix = false])
getAttachment (line 376)

Get an Attachment by Index (not PartId)

  • access: public
object Gadget_Mail_Attachment &getAttachment (int $idx)
  • int $idx
getBody (line 318)

Get HTML or PlainText Body

  • access: public
string getBody ()
getDate (line 265)

Get Message Date

Returns the arrival date if present, or the sent date if present; otherwise current date.

  • access: public
string getDate ()
getFlag (line 295)

Get a Message Flag

  • access: public
string getFlag (mixed $type)
getPlainBody (line 353)

Get PlainText Body

  • access: public
string getPlainBody ()
getSentDate (line 239)

Get Date when Message was Sent

  • access: public
string getSentDate ()
getSubject (line 284)

Get Subject

Get the literal (mime decoded) subject of the message.

  • access: public
string getSubject ()
isNew (line 307)

Is New

  • access: public
bool isNew ()
setDate (line 221)

Set Date

  • access: public
bool setDate (int|string $date)
  • int|string $date
toString (line 403)
  • todo:
void toString ([mixed $force_new_date = false])
typeToString (line 672)

Get the full Content Type of a Message Part

  • access: public
string typeToString (int $p, string $s)
  • int $p
  • string $s

Documentation generated on Sun, 03 Jul 2005 12:45:56 +0200 by phpDocumentor 1.3.0RC3