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

Class: Net_IMAP

Source Location: /Net_IMAP-1.0.2/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()
Net_IMAPProtocol::cmdDeleteAnnotation()
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()
Net_IMAPProtocol::cmdGetAnnotation()
Net_IMAPProtocol::cmdGetQuota()
******************************************************************
Net_IMAPProtocol::cmdGetQuotaRoot()
Net_IMAPProtocol::cmdList()
Send the LIST Command
Net_IMAPProtocol::cmdListRights()
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()
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()
******************************************************************
Net_IMAPProtocol::cmdSetAnnotation()
*****************************************************************************
Net_IMAPProtocol::cmdSetQuota()
Net_IMAPProtocol::cmdSetQuotaRoot()
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()
Net_IMAPProtocol::cmdUidFetch()
Net_IMAPProtocol::cmdUidSearch()
Send the SEARCH command.
Net_IMAPProtocol::cmdUidStore()
Send the UID STORE command.
Net_IMAPProtocol::cmdUnsubscribe()
Send the UNSUSCRIBE Mailbox Command
Net_IMAPProtocol::cmdX()
Send the X command.
Net_IMAPProtocol::getCurrentMailbox()
get current mailbox name
Net_IMAPProtocol::getDebugDialog()
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::setUnparsedResponse()
set the "returning of the unparsed response" feature on or off
Net_IMAPProtocol::utf_7_decode()
Net_IMAPProtocol::utf_7_encode()

Class Details

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


[ Top ]


Method Detail

Net_IMAP (Constructor)   [line 43]

Net_IMAP Net_IMAP( [string $host = 'localhost'], [int $port = 143], string 2)

Constructor

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


Parameters:

string   2   —  The value to give when sending EHLO or HELO.
string   $host   —  The server to connect to.
int   $port   —  The port to connect to.

[ Top ]

appendMessage   [line 756]

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

Appends a mail to a mailbox
  • Return: true on Success/PearError on Failure
  • Since: 1.0

Parameters:

string   $rfc_message   —  the message to append in RFC822 format
string   $mailbox   —  mailbox name to append to

[ Top ]

connect   [line 66]

true connect( string $host, string $port)

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

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


[ Top ]

copyMessages   [line 705]

mixed copyMessages( string $dest_mailbox, [ $msg_id = null], [string $source_mailbox = null], mixed $message_set)

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

Parameters:

string   $dest_mailbox   —  mailbox name to copy sessages to
mixed   $message_set   —  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
   $msg_id   — 

[ Top ]

createMailbox   [line 942]

mixed createMailbox( string $mailbox)

Creates the mailbox $mailbox
  • Return: true on Success/PearError on Failure
  • Since: 1.0

Parameters:

string   $mailbox   —  mailbox name to create

[ Top ]

deleteACL   [line 1564]

mixed deleteACL( string $mailbox_name, string $user)

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

Parameters:

string   $mailbox_name   —  the mailbox
string   $user   —  user to set the ACL

[ Top ]

deleteAnnotation   [line 1694]

void deleteAnnotation( $entry, $values, [ $mailbox_name = null])


Parameters:

   $entry   — 
   $values   — 
   $mailbox_name   — 

[ Top ]

deleteMailbox   [line 962]

mixed deleteMailbox( string $mailbox)

Deletes the mailbox $mailbox
  • Return: true on Success/PearError on Failure
  • Since: 1.0

Parameters:

string   $mailbox   —  mailbox name to delete

[ Top ]

deleteMessages   [line 655]

void deleteMessages( [ $msg_id = null])


Parameters:

   $msg_id   — 

[ Top ]

deleteMsg   [line 1830]

void deleteMsg( $msg_id)


Parameters:

   $msg_id   — 

[ Top ]

disconnect   [line 170]

void disconnect( [ $expungeOnExit = false])


Parameters:

   $expungeOnExit   — 

[ Top ]

examineMailbox   [line 219]

void examineMailbox( $mailbox)


Parameters:

   $mailbox   — 

[ Top ]

expunge   [line 1311]

void expunge( )

****************************************************************

* ** * MISC METHODS ** * ** ****************************************************************


[ Top ]

getACL   [line 1504]

string getACL( [string $mailbox_name = null])

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

Parameters:

string   $mailbox_name   —  Mailbox to get ACL info.

[ Top ]

getACLRights   [line 1628]

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

returns an array containing the rights that a user logged on has on the mailbox this method can be used by any user, not only the administrator
  • Return: string contailing 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
   $user   — 

[ Top ]

getAnnotation   [line 1714]

void getAnnotation( $entries, $values, [ $mailbox_name = null])


Parameters:

   $entries   — 
   $values   — 
   $mailbox_name   — 

[ Top ]

getBody   [line 379]

void getBody( $msg_id)


Parameters:

   $msg_id   — 

[ Top ]

getEnvelope   [line 538]

void getEnvelope( [ $mailbox = ''], [ $msg_id = null])


Parameters:

   $mailbox   — 
   $msg_id   — 

[ Top ]

getFlags   [line 1156]

mixed getFlags( [mixes $msg_id = null])

Lists the flags of the selected messages
  • Return: array on Success/PearError on Failure
  • Since: 1.0

Parameters:

mixes   $msg_id   —  the message list

[ Top ]

getHierarchyDelimiter   [line 802]

string getHierarchyDelimiter( [ $mailbox = ''])

Gets the HierachyDelimiter character used to create subfolders cyrus users "." and wu-imapd uses "/"

$param string the mailbox to get the hierarchy from

  • Return: the hierarchy delimiter
  • Since: 1.0
  • Access: public

Parameters:

   $mailbox   — 

[ Top ]

getListing   [line 1824]

void getListing( [ $msg_id = null])


Parameters:

   $msg_id   — 

[ Top ]

getMailboxes   [line 846]

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

Returns an array containing the names of the selected mailboxes
  • Return: true on Success/PearError on Failure
  • Since: 1.0

Parameters:

string   $mailbox_base   —  base mailbox to start the search $mailbox_base if $mailbox_base == '' then $mailbox_base is the curent selected mailbox
string   $restriction_search   —  false or 0 means return all mailboxes true or 1 return only the mailbox that contains that exact name
string   $returnAttributes   —  true means return an assoc array containing mailbox names and mailbox attributes
   $reference   — 

[ Top ]

getMailboxSize   [line 588]

void getMailboxSize( [ $mailbox = ''])


Parameters:

   $mailbox   — 

[ Top ]

getMessages   [line 403]

void getMessages( [ $msg_id = null], [ $indexIsMessageNumber = true])


Parameters:

   $msg_id   — 
   $indexIsMessageNumber   — 

[ Top ]

getMessagesList   [line 303]

void getMessagesList( [ $msg_id = null])


Parameters:

   $msg_id   — 

[ Top ]

getMessagesQuota   [line 1408]

assoc getMessagesQuota( [string $mailbox_name = null])

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

Parameters:

string   $mailbox_name   —  Mailbox to get quota info.

[ Top ]

getMsg   [line 1811]

void getMsg( $msg_id)


Parameters:

   $msg_id   — 

[ Top ]

getMyRights   [line 1587]

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 contailing 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

[ Top ]

getNumberOfMessages   [line 451]

void getNumberOfMessages( [ $mailbox = ''])


Parameters:

   $mailbox   — 

[ Top ]

getNumberOfRecentMessages   [line 506]

void getNumberOfRecentMessages( [ $mailbox = ''])


Parameters:

   $mailbox   — 

[ Top ]

getNumberOfUnSeenMessages   [line 479]

void getNumberOfUnSeenMessages( [ $mailbox = ''])


Parameters:

   $mailbox   — 

[ Top ]

getParsedHeaders   [line 267]

void getParsedHeaders( $msg_id)


Parameters:

   $msg_id   — 

[ Top ]

getRawHeaders   [line 244]

void getRawHeaders( $msg_id)


Parameters:

   $msg_id   — 

[ Top ]

getSize   [line 1794]

void getSize( )

***************************************************

*******************************************************


[ Top ]

getStorageQuota   [line 1372]

assoc getStorageQuota( [string $mailbox_name = null])

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

Parameters:

string   $mailbox_name   —  Mailbox to get quota info.

[ Top ]

getSummary   [line 333]

void getSummary( [ $msg_id = null])


Parameters:

   $msg_id   — 

[ Top ]

hasFlag   [line 1276]

void hasFlag( $message_nro, $flag)


Parameters:

   $message_nro   — 
   $flag   — 

[ Top ]

isAnswered   [line 1212]

mixed isAnswered( mixes $message_nro)

check the Answered flag
  • Return: true or false if the flag is sert PearError on Failure
  • Since: 1.0

Parameters:

mixes   $message_nro   —  the message to check

[ Top ]

isDeleted   [line 1266]

mixed isDeleted( mixes $message_nro)

check the Deleted flag
  • Return: true or false if the flag is sert PearError on Failure
  • Since: 1.0

Parameters:

mixes   $message_nro   —  the message to check

[ Top ]

isDraft   [line 1247]

mixed isDraft( mixes $message_nro)

check the Draft flag
  • Return: true or false if the flag is sert PearError on Failure
  • Since: 1.0

Parameters:

mixes   $message_nro   —  the message to check

[ Top ]

isFlagged   [line 1229]

mixed isFlagged( mixes $message_nro)

check the flagged flag
  • Return: true or false if the flag is sert PearError on Failure
  • Since: 1.0

Parameters:

mixes   $message_nro   —  the message to check

[ Top ]

isSeen   [line 1196]

mixed isSeen( mixes $message_nro)

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

Parameters:

mixes   $message_nro   —  the message to check

[ Top ]

listsubscribedMailboxes   [line 1071]

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

Lists the subscription to mailboxes
  • Return: true on Success/PearError on Failure
  • Since: 1.0

Parameters:

string   $mailbox_base   —  mailbox name start the search (see to getMailboxes() )
string   $mailbox_name   —  mailbox name filter the search (see to getMailboxes() )
   $reference   — 
   $restriction_search   — 
   $returnAttributes   — 

[ Top ]

login   [line 111]

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 916]

boolean mailboxExist( string $mailbox)

check if the mailbox name exists
  • Return: true on Success/false on Failure
  • Since: 1.0

Parameters:

string   $mailbox   —  mailbox name to check existance

[ Top ]

numMsg   [line 1799]

void numMsg( [ $mailbox = null])


Parameters:

   $mailbox   — 

[ Top ]

renameMailbox   [line 988]

mixed renameMailbox( $oldmailbox, $newmailbox, string $mailbox)

Renames the mailbox $mailbox
  • Return: true on Success/PearError on Failure
  • Since: 1.0

Parameters:

string   $mailbox   —  mailbox name to rename
   $oldmailbox   — 
   $newmailbox   — 

[ Top ]

search   [line 1332]

void search( $search_list, [ $uidSearch = false])


Parameters:

   $search_list   — 
   $uidSearch   — 

[ Top ]

selectMailbox   [line 198]

void selectMailbox( $mailbox)


Parameters:

   $mailbox   — 

[ Top ]

setACL   [line 1542]

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

Set ACL on a mailbox
  • Return: True on success, or PEAR_Error on false
  • 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 1674]

void setAnnotation( $entry, $values, [ $mailbox_name = null])

****************************************************************

* ** * ANNOTATEMORE METHODS ** * ** ****************************************************************


Parameters:

   $entry   — 
   $values   — 
   $mailbox_name   — 

[ Top ]

setMessagesQuota   [line 1466]

true setMessagesQuota( string $mailbox_name, $quota)

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

Parameters:

string   $mailbox_name   —  Mailbox to get quota info.
   $quota   — 

[ Top ]

setStorageQuota   [line 1444]

true setStorageQuota( string $mailbox_name, $quota)

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

Parameters:

string   $mailbox_name   —  Mailbox to get quota info.
   $quota   — 

[ Top ]

subscribeMailbox   [line 1023]

mixed subscribeMailbox( [string $mailbox = null])

Subscribes to the selected mailbox
  • Return: true on Success/PearError on Failure
  • Since: 1.0

Parameters:

string   $mailbox   —  mailbox name to subscribe

[ Top ]

unsubscribeMailbox   [line 1047]

mixed unsubscribeMailbox( [string $mailbox = null])

Removes the subscription to a mailbox
  • Return: true on Success/PearError on Failure
  • Since: 1.0

Parameters:

string   $mailbox   —  mailbox name to unsubscribe

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:54:08 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.