Net_IMAP
[ class tree: Net_IMAP ] [ index: Net_IMAP ] [ all elements ]

Class: Net_IMAP

Source Location: /Net_IMAP-1.1.3/Net/IMAP.php

Class Overview

Net_IMAPProtocol
   |
   --Net_IMAP

Provides an implementation of the IMAP protocol using PEAR's Net_Socket:: class.


Author(s):

Methods


Inherited Variables

Inherited Methods

Class: Net_IMAPProtocol

Net_IMAPProtocol::Net_IMAPProtocol()
Constructor
Net_IMAPProtocol::cmdAppend()
Send the APPEND Command
Net_IMAPProtocol::cmdAuthenticate()
Attempt to authenticate to the iMAP server.
Net_IMAPProtocol::cmdCapability()
Send the CAPABILITY Command
Net_IMAPProtocol::cmdCheck()
Send the CHECK command.
Net_IMAPProtocol::cmdClose()
Send the CLOSE command.
Net_IMAPProtocol::cmdConnect()
Attempt to connect to the IMAP server.
Net_IMAPProtocol::cmdCopy()
Send the COPY command.
Net_IMAPProtocol::cmdCreate()
Send the CREATE Mailbox Command
Net_IMAPProtocol::cmdDelete()
Send the DELETE Mailbox Command
Net_IMAPProtocol::cmdDeleteACL()
Send the DELETEACL command.
Net_IMAPProtocol::cmdDeleteAnnotation()
Send the DELETEANNOTATION command.
Net_IMAPProtocol::cmdExamine()
Send the EXAMINE Mailbox Command
Net_IMAPProtocol::cmdExpunge()
Send the EXPUNGE command.
Net_IMAPProtocol::cmdFetch()
Send the FETCH Command
Net_IMAPProtocol::cmdGetACL()
Send the GETACL command.
Net_IMAPProtocol::cmdGetAnnotation()
Send the GETANNOTATION command.
Net_IMAPProtocol::cmdGetQuota()
Send the GETQUOTA command.
Net_IMAPProtocol::cmdGetQuotaRoot()
Send the GETQUOTAROOT command.
Net_IMAPProtocol::cmdList()
Send the LIST Command
Net_IMAPProtocol::cmdListRights()
Send the LISTRIGHTS command.
Net_IMAPProtocol::cmdLogin()
Attempt to login to the iMAP server.
Net_IMAPProtocol::cmdLogout()
Attempt to disconnect from the iMAP server.
Net_IMAPProtocol::cmdLsub()
Send the LSUB Command
Net_IMAPProtocol::cmdMyRights()
Send the MYRIGHTS command.
Net_IMAPProtocol::cmdNamespace()
Send the CAPABILITY Command
Net_IMAPProtocol::cmdNoop()
Send the NOOP command.
Net_IMAPProtocol::cmdRename()
Send the RENAME Mailbox Command
Net_IMAPProtocol::cmdSearch()
Send the SEARCH command.
Net_IMAPProtocol::cmdSelect()
Send the Select Mailbox Command
Net_IMAPProtocol::cmdSetACL()
Send the SETACL command.
Net_IMAPProtocol::cmdSetAnnotation()
Send the SETANNOTATION command.
Net_IMAPProtocol::cmdSetQuota()
Send the SETQUOTA command.
Net_IMAPProtocol::cmdSetQuotaRoot()
Send the SETQUOTAROOT command.
Net_IMAPProtocol::cmdSort()
Send the SORT command.
Net_IMAPProtocol::cmdStartTLS()
Return true if the TLS negotiation was successful
Net_IMAPProtocol::cmdStatus()
Send the STATUS Mailbox Command
Net_IMAPProtocol::cmdStore()
Send the STORE command.
Net_IMAPProtocol::cmdSubscribe()
Send the SUSCRIBE Mailbox Command
Net_IMAPProtocol::cmdUidCopy()
The UID COPY command
Net_IMAPProtocol::cmdUidFetch()
The UID FETH command
Net_IMAPProtocol::cmdUidSearch()
Send the SEARCH command.
Net_IMAPProtocol::cmdUidSort()
Send the UID SORT command.
Net_IMAPProtocol::cmdUidStore()
Send the UID STORE command.
Net_IMAPProtocol::cmdUnsubscribe()
Send the UNSUBSCRIBE Mailbox Command
Net_IMAPProtocol::cmdX()
Send the X command.
Net_IMAPProtocol::escape()
Escapes a string when it contains special characters (RFC3501)
Net_IMAPProtocol::getCurrentMailbox()
get current mailbox name
Net_IMAPProtocol::getDebugDialog()
get the debug dialog
Net_IMAPProtocol::getLastCmdId()
get the last cmd ID
Net_IMAPProtocol::getServerAuthMethods()
tell if the server has capability $capability
Net_IMAPProtocol::getUnparsedResponse()
get the "returning of the unparsed response" feature status
Net_IMAPProtocol::hasAclSupport()
tell if the server has Quota support
Net_IMAPProtocol::hasAnnotateMoreSupport()
tell if the server has support for the ANNOTATEMORE extension
Net_IMAPProtocol::hasCapability()
tell if the server has capability $capability
Net_IMAPProtocol::hasQuotaSupport()
tell if the server has Quota support
Net_IMAPProtocol::setDebug()
Sets the debuging information on or off
Net_IMAPProtocol::setPrintErrors()
Sets printed output of errors on or of
Net_IMAPProtocol::setStreamContextOptions()
set the options for a SSL/TLS connection (see documentation for stream_context_create)
Net_IMAPProtocol::setTimeout()
set the the timeout for the connection to the IMAP server.
Net_IMAPProtocol::setUnparsedResponse()
set the "returning of the unparsed response" feature on or off
Net_IMAPProtocol::utf7Decode()
Decode string from UTF7
Net_IMAPProtocol::utf7Encode()
Encode string to UTF7
Net_IMAPProtocol::utf_7_decode()
Decode string from UTF7
Net_IMAPProtocol::utf_7_encode()
Encode string to UTF7
Net_IMAPProtocol::_createQuotedString()
Create a quoted string

Class Details

[line 33]
Provides an implementation of the IMAP protocol using PEAR's Net_Socket:: class.


[ Top ]


Method Detail

Net_IMAP (Constructor)   [line 46]

Net_IMAP Net_IMAP( [string $host = 'localhost'], [int $port = 143], [bool $enableSTARTTLS = true], [string $encoding = 'ISO-8859-1'])

Constructor

Instantiates a new Net_SMTP object, overriding any defaults with parameters that are passed in.


Parameters:

string   $host     The server to connect to.
int   $port     The port to connect to.
bool   $enableSTARTTLS     Enable STARTTLS support
string   $encoding     Character encoding

[ Top ]

addAnswered   [line 2020]

mixed addAnswered( mixed $msg_id)

adds the Answered flag (\Answered) to the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     The message list or string "all" for all

[ Top ]

addDeleted   [line 2037]

mixed addDeleted( mixed $msg_id)

adds the Deleted flag (\Deleted) to the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     The message list or string "all" for all

[ Top ]

addDraft   [line 2071]

mixed addDraft( mixed $msg_id)

adds the Draft flag (\Draft) to the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     The message list or string "all" for all

[ Top ]

addFlagged   [line 2054]

mixed addFlagged( mixed $msg_id)

adds the Flagged flag (\Flagged) to the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     The message list or string "all" for all

[ Top ]

addFlags   [line 1986]

mixed addFlags( mixed $msg_id, mixed $flags)

adds flags to the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     The message list or string "all" for all
mixed   $flags     Flags to set (space separated String or array)

[ Top ]

addSeen   [line 2003]

mixed addSeen( mixed $msg_id)

adds the Seen flag (\Seen) to the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     The message list or string "all" for all

[ Top ]

appendMessage   [line 1400]

mixed appendMessage( string $rfc_message, [string $mailbox = null], [string $flags_list = ''])

Appends a mail to a mailbox
  • Return: true on success / Pear_Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $rfc_message     the message to append in RFC822 format
string   $mailbox     mailbox name to append to (default is current mailbox)
string   $flags_list     set flags appended message

[ Top ]

connect   [line 73]

true connect( string $host, string $port, [bool $enableSTARTTLS = true])

Attempt to connect to the IMAP server located at $host $port
  • Return: on success or PEAR_Error
  • Since: 1.0
  • Access: public

Parameters:

string   $host     The IMAP server
string   $port     The IMAP port
bool   $enableSTARTTLS     

enable STARTTLS support

It is only useful in a very few circunstances because the contructor already makes this job


[ Top ]

copyMessages   [line 1343]

mixed copyMessages( string $dest_mailbox, [mixed $msg_id = null], [string $source_mailbox = null], [boolean $uidCopy = false])

Copies mail from one folder to another
  • Return: true on Success/PearError on Failure
  • Since: 1.0
  • Access: public

Parameters:

string   $dest_mailbox     mailbox name to copy sessages to
mixed   $msg_id     the messages that I want to copy (all by default) it also can be an array
string   $source_mailbox     mailbox name from where the messages are copied (default is current mailbox)
boolean   $uidCopy     msg_id contains UID's instead of Message Sequence Number if set to true

[ Top ]

createMailbox   [line 1628]

mixed createMailbox( string $mailbox, [array $options = null])

Creates the mailbox $mailbox
  • Return: true on success/PearError on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     Mailbox name to create
array   $options     Options to pass to create (default is no options)

[ Top ]

deleteACL   [line 2679]

mixed deleteACL( string $mailbox_name, string $user)

deletes the ACL on a mailbox
  • Return: true on success, or PEAR_Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     The mailbox
string   $user     User to delete the ACL

[ Top ]

deleteAnnotation   [line 2827]

mixed deleteAnnotation( string $entry, array $values, [string $mailbox_name = null])

delete annotation
  • Return: true on success or PEAR Error on failure
  • Since: 1.0.2
  • Access: public

Parameters:

string   $entry     Entry
array   $values     Values
string   $mailbox_name     Mailbox name (default is current mailbox)

[ Top ]

deleteMailbox   [line 1654]

mixed deleteMailbox( string $mailbox)

Deletes the mailbox $mailbox
  • Return: true on success/PearError on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     Name of the Mailbox that should be deleted

[ Top ]

deleteMessages   [line 1285]

mixed deleteMessages( [int $msg_id = null], [boolean $uidStore = false])

Marks a message for deletion. Only will be deleted if the disconnect() method is called with auto-expunge on true or expunge() method is called.
  • Return: true on success / Pear_Error on failure
  • Access: public

Parameters:

int   $msg_id     Message to delete (default = null)
boolean   $uidStore     msg_id contains UID's instead of Message Sequence Number if set to true (default = false)

[ Top ]

deleteMsg   [line 3022]

same deleteMsg( int $msg_id)

same as deleteMessages($msg_id) Net_POP3 Compatibility function
  • Return: as deleteMessages()
  • Access: public

Parameters:

int   $msg_id     Message number

[ Top ]

disconnect   [line 206]

mixed disconnect( [boolean $expungeOnExit = false])

Disconnect function. Sends the QUIT command and closes the socket.
  • Return: true on success / Pear_Error on failure
  • Access: public

Parameters:

boolean   $expungeOnExit     (default = false)

[ Top ]

examineMailbox   [line 270]

mixed examineMailbox( string $mailbox)

Checks the mailbox $mailbox
  • Return: true on success / Pear_Error on failure
  • Access: public

Parameters:

string   $mailbox     Mailbox to examine

[ Top ]

expunge   [line 2310]

mixed expunge( )

expunge function. Sends the EXPUNGE command
  • Return: true on success / PEAR Error on failure
  • Since: 1.0
  • Access: public

[ Top ]

getACL   [line 2615]

mixed getACL( [string $mailbox_name = null])

get the Access Control List details
  • Return: string on success or false or PEAR_Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     Mailbox to get ACL info. (default is current mailbox)

[ Top ]

getACLRights   [line 2747]

mixed getACLRights( string $user, [string $mailbox_name = null])

returns an array containing the rights for given user on the mailbox this method can be used by any user, not only the administrator
  • Return: string containing the list of rights on success, or PEAR_Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $user     The user to query rights
string   $mailbox_name     The mailbox to query rights (default is current mailbox)

[ Top ]

getAnnotation   [line 2861]

mixed getAnnotation( string $entries, array $values, [string $mailbox_name = null])

get annotation
  • Return: array containing annotations on success or PEAR Error on failure
  • Since: 1.0.2
  • Access: public

Parameters:

string   $entries     Entries
array   $values     Values
string   $mailbox_name     Mailbox name (default is current mailbox)

[ Top ]

getBody   [line 530]

mixed getBody( string $msg_id, [boolean $uidFetch = false], [string $partId = ''])

Returns the body of the message with given message number.
  • Return: Either message body or PEAR_Error on failure
  • Access: public

Parameters:

string   $msg_id     Message number
boolean   $uidFetch     msg_id contains UID's instead of Message Sequence Number if set to true
string   $partId     Part ID

[ Top ]

getBodyPart   [line 566]

mixed getBodyPart( int $msg_id, string $partId, [boolean $uidFetch = false])

Returns the body of the message with given message number.
  • Return: Either message body or false on error
  • Access: public

Parameters:

int   $msg_id     Message number
string   $partId     Message number
boolean   $uidFetch     msg_id contains UID's instead of Message Sequence Number if set to true

[ Top ]

getEnvelope   [line 1162]

mixed getEnvelope( [string $mailbox = ''], [mixed $msg_id = null], [boolean $uidFetch = false])

Returns an array containing the message envelope
  • Return: Either the envelopes or Pear_Error on error
  • Access: public

Parameters:

string   $mailbox     get's not used anywhere (will be removed with next major release)
mixed   $msg_id     Message number (default = null)
boolean   $uidFetch     msg_id contains UID's instead of Message Sequence Number if set to true

[ Top ]

getFlags   [line 1865]

mixed getFlags( [mixed $msg_id = null], [boolean $includeUid = false])

Lists the flags of the selected messages
  • Return: array on success/PearError on failure
  • Since: 1.0
  • Access: public

Parameters:

mixed   $msg_id     the message list
boolean   $includeUid     include uid in result

[ Top ]

getHierarchyDelimiter   [line 1475]

string getHierarchyDelimiter( [string $mailbox = ''])

Gets the HierachyDelimiter character used to create subfolders cyrus users "." and wu-imapd uses "/"
  • Return: The hierarchy delimiter
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     The mailbox to get the hierarchy from

[ Top ]

getListing   [line 3005]

same getListing( [int $msg_id = null])

same as getMessagesList($msg_id) Net_POP3 Compatibility function
  • Return: as getMessagesList()
  • Access: public

Parameters:

int   $msg_id     Message number

[ Top ]

getMailboxes   [line 1520]

mixed getMailboxes( [string $reference = ''], [string $restriction_search = 0], [string $returnAttributes = false])

Returns an array containing the names of the selected mailboxes
  • Return: true on success/PearError on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $reference     base mailbox to start the search (default is current mailbox)
string   $restriction_search     false or 0 means return all mailboxes true or 1 return only the mailbox that contains that exact name 2 return all mailboxes in that hierarchy level
string   $returnAttributes     true means return an assoc array containing mailbox names and mailbox attributes,false - the default - means return an array of mailboxes

[ Top ]

getMailboxSize   [line 1219]

mixed getMailboxSize( [string $mailbox = ''])

Returns the sum of all the sizes of messages in $mailbox

WARNING!!! The method's performance is not good if you have a lot of messages in the mailbox Use with care!

  • Return: Either size of maildrop or false on error
  • Access: public

Parameters:

string   $mailbox     The mailbox (default is current mailbox)

[ Top ]

getMessages   [line 962]

mixed getMessages( [int $msg_id = null], [boolean $indexIsMessageNumber = true])

Returns the entire message with given message number.
  • Return: Either entire message or false on error
  • Access: public

Parameters:

int   $msg_id     Message number (default = null)
boolean   $indexIsMessageNumber     true if index is a message number (default = true)

[ Top ]

getMessagesList   [line 394]

mixed getMessagesList( [string $msg_id = null])

Returns an array containing the message ID, the size and the UID of each message selected.

message selection can be a valid IMAP command, a number or an array of messages

  • Return: Either array of message data or PearError on error
  • Access: public

Parameters:

string   $msg_id     Message number

[ Top ]

getMessagesQuota   [line 2508]

assoc getMessagesQuota( [string $mailbox_name = null])

Returns MESSAGES quota details
  • Return: array contaning the quota info on success or PEAR_Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     Mailbox to get quota info. (default is current mailbox)

[ Top ]

getMsg   [line 2979]

mixed getMsg( int $msg_id)

Returns the entire message with given message number.

Net_POP3 Compatibility function

  • Return: Either entire message or PEAR Error on failure
  • Access: public

Parameters:

int   $msg_id     Message number

[ Top ]

getMyRights   [line 2708]

mixed getMyRights( [string $mailbox_name = null])

returns the rights that the user logged on has on the mailbox this method can be used by any user, not only the administrator
  • Return: string containing the list of rights on success, or PEAR_Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     The mailbox to query rights (default is current mailbox)

[ Top ]

getNamespace   [line 1427]

mixed getNamespace( )

Returns the namespace
  • Return: namespace or PearError on failure
  • Since: 1.1
  • Access: public

[ Top ]

getNumberOfMessages   [line 1014]

mixed getNumberOfMessages( [string $mailbox = ''])

Returns number of messages in this mailbox
  • Return: Either number of messages or Pear_Error on failure
  • Access: public

Parameters:

string   $mailbox     the mailbox (default is current mailbox)

[ Top ]

getNumberOfRecentMessages   [line 1090]

mixed getNumberOfRecentMessages( [string $mailbox = ''])

Returns number of UnSeen messages in this mailbox
  • Return: Either number of messages or Pear_Error on failure
  • Access: public

Parameters:

string   $mailbox     the mailbox (default is current mailbox)

[ Top ]

getNumberOfUnSeenMessages   [line 1052]

mixed getNumberOfUnSeenMessages( [string $mailbox = ''])

Returns number of UnSeen messages in this mailbox
  • Return: Either number of messages or Pear_Error on failure
  • Access: public

Parameters:

string   $mailbox     the mailbox (default is current mailbox)

[ Top ]

getParsedHeaders   [line 346]

mixed getParsedHeaders( int $msg_id, [boolean $keysToUpper = false], [string $part_id = ''], [boolean $uidFetch = false])

Returns the headers of the specified message in an

associative array. Array keys are the header names, array values are the header values. In the case of multiple headers having the same names, eg Received:, the array value will be an indexed array of all the header values.

  • Return: Either array of headers or false on error
  • Access: public

Parameters:

int   $msg_id     Message number
boolean   $keysToUpper     false (default) original header names true change keys (header names) toupper
string   $part_id     Part ID
boolean   $uidFetch     msg_id contains UID's instead of Message Sequence Number if set to true

[ Top ]

getRawHeaders   [line 302]

mixed getRawHeaders( int $msg_id, [string $part_id = ''], [boolean $uidFetch = false])

Returns the raw headers of the specified message.
  • Return: Either raw headers or false on error
  • Access: public

Parameters:

int   $msg_id     Message number
string   $part_id     Part ID
boolean   $uidFetch     msg_id contains UID's instead of Message Sequence Number if set to true

[ Top ]

getSize   [line 2948]

same getSize( )

same as getMailboxSize() Net_POP3 Compatibility function
  • Return: as getMailboxSize();
  • Access: public

[ Top ]

getStatus   [line 1127]

mixed getStatus( [string $mailbox = ''])

Returns number of UnSeen messages in this mailbox
  • Return: Either number of messages or Pear_Error on error
  • Access: public

Parameters:

string   $mailbox     the mailbox (default is current mailbox)

[ Top ]

getStorageQuota   [line 2464]

assoc getStorageQuota( [string $mailbox_name = null])

Returns STORAGE quota details
  • Return: array contaning the quota info on success or PEAR_Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     Mailbox to get quota info. (default is current mailbox)

[ Top ]

getStorageQuotaRoot   [line 2420]

assoc getStorageQuotaRoot( [string $mailbox_name = null])

Returns STORAGE quota details
  • Return: array contaning the quota info on success or PEAR_Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     Mailbox to get quota info. (default is current mailbox)

[ Top ]

getStructure   [line 599]

mixed getStructure( int $msg_id, [boolean $uidFetch = false])

Returns the body of the message with given message number.
  • Return: Either message body or false on error
  • Access: public

Parameters:

int   $msg_id     Message number
boolean   $uidFetch     msg_id contains UID's instead of Message Sequence Number if set to true

[ Top ]

getSummary   [line 440]

mixed getSummary( [mixed $msg_id = null], [boolean $uidFetch = false])

Message summary
  • Return: Either array of headers or PEAR::Error on error
  • Access: public

Parameters:

mixed   $msg_id     Message number
boolean   $uidFetch     msg_id contains UID's instead of Message Sequence Number if set to true

[ Top ]

hasFlag   [line 2277]

mixed hasFlag( mixed $message_nro, string $flag)

checks if a flag is set
  • Return: true or false if the flag is set PearError on Failure
  • Since: 1.0
  • Access: public

Parameters:

mixed   $message_nro     The message to check
string   $flag     The flag that should be checked

[ Top ]

isAnswered   [line 2208]

mixed isAnswered( mixed $message_nro)

check the Answered flag
  • Return: true or false if the flag is set PearError on failure
  • Since: 1.0
  • Access: public

Parameters:

mixed   $message_nro     The message to check

[ Top ]

isDeleted   [line 2259]

mixed isDeleted( mixed $message_nro)

check the Deleted flag
  • Return: true or false if the flag is set PearError on failure
  • Since: 1.0
  • Access: public

Parameters:

mixed   $message_nro     The message to check

[ Top ]

isDraft   [line 2242]

mixed isDraft( mixed $message_nro)

check the Draft flag
  • Return: true or false if the flag is set PearError on failure
  • Since: 1.0
  • Access: public

Parameters:

mixed   $message_nro     The message to check

[ Top ]

isFlagged   [line 2225]

mixed isFlagged( mixed $message_nro)

check the flagged flag
  • Return: true or false if the flag is set PearError on failure
  • Since: 1.0
  • Access: public

Parameters:

mixed   $message_nro     The message to check

[ Top ]

isSeen   [line 2191]

mixed isSeen( mixed $message_nro)

check the Seen flag
  • Return: true or false if the flag is set PearError on Failure
  • Since: 1.0
  • Access: public

Parameters:

mixed   $message_nro     The message to check

[ Top ]

listsubscribedMailboxes   [line 1785]

mixed listsubscribedMailboxes( [string $reference = ''], [string $restriction_search = 0], [boolean $returnAttributes = false])

Lists the subscription to mailboxes
  • Return: true on success/PearError on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $reference     Mailbox name start the search (see to getMailboxes() )
string   $restriction_search     Mailbox_name Mailbox name filter the search (see to getMailboxes() )
boolean   $returnAttributes     Return the attributes

[ Top ]

login   [line 127]

true login( string $user, string $pass, [string $useauthenticate = true], [boolean $selectMailbox = true])

Attempt to authenticate to the IMAP server.
  • Return: on success or PEAR_Error
  • Since: 1.0
  • Access: public

Parameters:

string   $user     The userid to authenticate as.
string   $pass     The password to authenticate with.
string   $useauthenticate     true: authenticate using the IMAP AUTHENTICATE command. false: authenticate using the IMAP AUTHENTICATE command. 'string': authenticate using the IMAP AUTHENTICATE command but using the authMethod in 'string'
boolean   $selectMailbox     automaticaly select inbox on login (false does not)

[ Top ]

mailboxExist   [line 1598]

mixed mailboxExist( string $mailbox)

Check if the mailbox name exists
  • Return: boolean true/false or PEAR_Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     Mailbox name to check existance

[ Top ]

numMsg   [line 2963]

same numMsg( [string $mailbox = null])

same as getNumberOfMessages($mailbox) Net_POP3 Compatibility function
  • Return: as getNumberOfMessages($mailbox)
  • Access: public

Parameters:

string   $mailbox     Mailbox (default is current mailbox)

[ Top ]

removeAnswered   [line 2123]

mixed removeAnswered( mixed $msg_id)

remove the Answered flag (\Answered) from the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     The message list or string "all" for all

[ Top ]

removeDeleted   [line 2140]

mixed removeDeleted( mixed $msg_id)

remove the Deleted flag (\Deleted) from the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     The message list or string "all" for all

[ Top ]

removeDraft   [line 2174]

mixed removeDraft( mixed $msg_id)

remove the Draft flag (\Draft) from the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     The message list or string "all" for all

[ Top ]

removeFlagged   [line 2157]

mixed removeFlagged( mixed $msg_id)

remove the Flagged flag (\Flagged) from the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     The message list or string "all" for all

[ Top ]

removeFlags   [line 2089]

mixed removeFlags( mixed $msg_id, mixed $flags)

remove flags from the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     The message list or string "all" for all
mixed   $flags     Flags to remove (space separated string or array)

[ Top ]

removeSeen   [line 2106]

mixed removeSeen( mixed $msg_id)

remove the Seen flag (\Seen) from the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     The message list or string "all" for all

[ Top ]

renameMailbox   [line 1686]

mixed renameMailbox( string $oldmailbox, string $newmailbox, [array $options = null])

Renames the mailbox $mailbox
  • Return: true on success/PearError on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $oldmailbox     mailbox name to rename
string   $newmailbox     new name for the mailbox
array   $options     options to pass to rename

[ Top ]

search   [line 2338]

mixed search( string $search_list, [boolean $uidSearch = false])

Search function. Sends the SEARCH command
  • Return: Message array or PEAR Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $search_list     Search criterias
boolean   $uidSearch     If set to true UID SEARCH is send instead of SEARCH

[ Top ]

selectMailbox   [line 245]

mixed selectMailbox( string $mailbox)

Changes the default/current mailbox to $mailbox
  • Return: true on success / Pear_Error on failure
  • Access: public

Parameters:

string   $mailbox     Mailbox to select

[ Top ]

setACL   [line 2652]

mixed setACL( string $mailbox_name, string $user, string $acl)

Set ACL on a mailbox
  • Return: true on success or PEAR_Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     The mailbox
string   $user     User to set the ACL
string   $acl     ACL list

[ Top ]

setAnnotation   [line 2794]

mixed setAnnotation( string $entry, array $values, [string $mailbox_name = null])

set annotation
  • Return: true on success or PEAR Error on failure
  • Since: 1.0.2
  • Access: public

Parameters:

string   $entry     Entry
array   $values     Values
string   $mailbox_name     Mailbox name (default is current mailbox)

[ Top ]

setFlags   [line 1920]

mixed setFlags( mixed $msg_id, mixed $flags, [string $mod = 'set'], [boolean $uidStore = false])

Sets the flags of the selected messages
  • Return: true on success/PearError on failure
  • Since: 1.1
  • Access: public

Parameters:

mixed   $msg_id     the message list or string "all" for all
mixed   $flags     flags to set (space separated String or array)
string   $mod     "set" to set flags (default), "add" to add flags, "remove" to remove flags
boolean   $uidStore     msg_id contains UID's instead of Message Sequence Number if set to true

[ Top ]

setMessagesQuota   [line 2578]

true setMessagesQuota( string $mailbox_name, int $quota)

sets MESSAGES quota
  • Return: on success or PEAR_Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     Mailbox to set quota
int   $quota     Quotasize

[ Top ]

setStorageQuota   [line 2551]

true setStorageQuota( string $mailbox_name, int $quota)

sets STORAGE quota
  • Return: on success or PEAR_Error on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     Mailbox to set quota
int   $quota     Quotasize

[ Top ]

sort   [line 2372]

mixed sort( string $sort_list, [string $charset = 'US-ASCII'], [string $search_list = ''], [boolean $uidSort = false])

sort function. Sends the SORT command
  • Return: message array or PEAR Error on failure
  • Since: 1.1
  • Access: public

Parameters:

string   $sort_list     sort program
string   $charset     charset specification (default = 'US-ASCII')
string   $search_list     searching criteria
boolean   $uidSort     if set to true UID SORT is send instead of SORT

[ Top ]

subscribeMailbox   [line 1722]

mixed subscribeMailbox( [string $mailbox = null])

Subscribes to the selected mailbox
  • Return: true on success/PearError on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     Mailbox name to subscribe (default is current mailbox)

[ Top ]

unsubscribeMailbox   [line 1752]

mixed unsubscribeMailbox( [string $mailbox = null])

Removes the subscription to a mailbox
  • Return: true on success/PearError on failure
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     Mailbox name to unsubscribe (default is current mailbox)

[ Top ]


Documentation generated on Mon, 31 Mar 2014 14:00:06 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.