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

Class: Net_IMAPProtocol

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

Class Overview


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


Author(s):

Variables

Methods


Child classes:

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

Inherited Variables

Inherited Methods


Class Details

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


[ Top ]


Class Variables

$currentMailbox =  'INBOX'

[line 60]

The the current mailbox

Type:   string


[ Top ]

$dbgDialog =  ''

[line 94]


Type:   mixed


[ Top ]

$supportedAuthMethods = array('DIGEST-MD5', 'CRAM-MD5', 'LOGIN')

[line 38]

The auth methods this class support

Type:   array


[ Top ]

$supportedSASLAuthMethods = array('DIGEST-MD5', 'CRAM-MD5')

[line 45]

The auth methods this class support

Type:   array


[ Top ]



Method Detail

Net_IMAPProtocol (Constructor)   [line 168]

Net_IMAPProtocol Net_IMAPProtocol( )

Constructor

Instantiates a new Net_IMAP object.

  • Since: 1.0

[ Top ]

cmdAppend   [line 1148]

mixed cmdAppend( string $mailbox, string $msg, [string $flags_list = ''], [string $time = ''])

Send the APPEND Command
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     Mailbox name
string   $msg     Message
string   $flags_list     Flags list
string   $time     Time

[ Top ]

cmdAuthenticate   [line 526]

array cmdAuthenticate( string $uid, string $pwd, [string $userMethod = null])

Attempt to authenticate to the iMAP server.
  • Return: Returns an array containing the response
  • Since: 1.0
  • Access: public

Parameters:

string   $uid     The userid to authenticate as.
string   $pwd     The password to authenticate with.
string   $userMethod     The cmdID.

[ Top ]

cmdCapability   [line 994]

mixed cmdCapability( )

Send the CAPABILITY Command
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

[ Top ]

cmdCheck   [line 811]

array cmdCheck( )

Send the CHECK command.
  • Return: Returns an array containing the response
  • Since: 1.0
  • Access: public

[ Top ]

cmdClose   [line 1221]

mixed cmdClose( )

Send the CLOSE command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

[ Top ]

cmdConnect   [line 197]

mixed cmdConnect( [string $host = 'localhost'], [int $port = 143])

Attempt to connect to the IMAP server.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $host     Hostname of the IMAP server
int   $port     Port of the IMAP server (default = 143)

[ Top ]

cmdCopy   [line 1369]

mixed cmdCopy( string $message_set, string $mailbox)

Send the COPY command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $message_set     Message set
string   $mailbox     Mailbox name

[ Top ]

cmdCreate   [line 881]

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

Send the CREATE Mailbox Command
  • Return: Returns an array containing the response
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     The mailbox to create.
array   $options     Options to pass to create

[ Top ]

cmdDelete   [line 925]

array cmdDelete( string $mailbox)

Send the DELETE Mailbox Command
  • Return: Returns an array containing the response
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     The mailbox name to delete.

[ Top ]

cmdDeleteACL   [line 1777]

mixed cmdDeleteACL( string $mailbox_name, string $user)

Send the DELETEACL command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     Mailbox name
string   $user     User

[ Top ]

cmdDeleteAnnotation   [line 1946]

mixed cmdDeleteAnnotation( string $mailboxName, string $entry, string $values)

Send the DELETEANNOTATION command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success
  • Since: 1.0
  • Access: public

Parameters:

string   $mailboxName     Mailbox name
string   $entry     Entry
string   $values     Value

[ Top ]

cmdExamine   [line 849]

array cmdExamine( string $mailbox)

Send the EXAMINE Mailbox Command
  • Return: Returns an array containing the response
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     The mailbox to examine.

[ Top ]

cmdExpunge   [line 1236]

mixed cmdExpunge( )

Send the EXPUNGE command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

[ Top ]

cmdFetch   [line 979]

mixed cmdFetch( string $msgset, string $fetchparam)

Send the FETCH Command
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $msgset     msgset
string   $fetchparam     fetchparam

[ Top ]

cmdGetACL   [line 1804]

mixed cmdGetACL( string $mailbox_name)

Send the GETACL command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or ACL list on success
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     Mailbox name

[ Top ]

cmdGetAnnotation   [line 1988]

mixed cmdGetAnnotation( string $mailboxName, string $entries, string $values)

Send the GETANNOTATION command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or GETANNOTATION result on success
  • Since: 1.0
  • Access: public

Parameters:

string   $mailboxName     Mailbox name
string   $entries     Entries
string   $values     Value

[ Top ]

cmdGetQuota   [line 1556]

mixed cmdGetQuota( string $mailbox_name)

Send the GETQUOTA command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or quota data on success
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     The mailbox name to query for quota data

[ Top ]

cmdGetQuotaRoot   [line 1586]

mixed cmdGetQuotaRoot( string $mailbox_name)

Send the GETQUOTAROOT command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or quota data on success
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     The ailbox name to query for quota data

[ Top ]

cmdList   [line 1104]

mixed cmdList( string $mailbox_base, string $mailbox)

Send the LIST Command
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_base     mailbox_base
string   $mailbox     The mailbox name

[ Top ]

cmdListRights   [line 1834]

mixed cmdListRights( string $mailbox_name, string $user)

Send the LISTRIGHTS command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or list of users rights
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     Mailbox name
string   $user     User

[ Top ]

cmdLogin   [line 507]

array cmdLogin( string $uid, string $pwd)

Attempt to login to the iMAP server.
  • Return: Returns an array containing the response
  • Since: 1.0
  • Access: public

Parameters:

string   $uid     The userid to authenticate as.
string   $pwd     The password to authenticate with.

[ Top ]

cmdLogout   [line 769]

array cmdLogout( )

Attempt to disconnect from the iMAP server.
  • Return: Returns an array containing the response
  • Since: 1.0
  • Access: public

[ Top ]

cmdLsub   [line 1125]

mixed cmdLsub( string $mailbox_base, string $mailbox)

Send the LSUB Command
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_base     mailbox_base
string   $mailbox     The mailbox name

[ Top ]

cmdMyRights   [line 1864]

mixed cmdMyRights( string $mailbox_name)

Send the MYRIGHTS command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or MYRIGHTS response on success
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     Mailbox name

[ Top ]

cmdNamespace   [line 1026]

mixed cmdNamespace( )

Send the CAPABILITY Command
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

[ Top ]

cmdNoop   [line 797]

array cmdNoop( )

Send the NOOP command.
  • Return: Returns an array containing the response
  • Since: 1.0
  • Access: public

[ Top ]

cmdRename   [line 903]

array cmdRename( string $mailbox, string $new_mailbox, [array $options = null])

Send the RENAME Mailbox Command
  • Return: Returns an array containing the response
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     The old mailbox name.
string   $new_mailbox     The new (renamed) mailbox name.
array   $options     options to pass to create

[ Top ]

cmdSearch   [line 1270]

mixed cmdSearch( string $search_cmd)

Send the SEARCH command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $search_cmd     Search command

[ Top ]

cmdSelect   [line 827]

array cmdSelect( string $mailbox)

Send the Select Mailbox Command
  • Return: Returns an array containing the response
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     The mailbox to select.

[ Top ]

cmdSetACL   [line 1743]

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

Send the SETACL command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     Mailbox name
string   $user     User
string   $acl     ACL string

[ Top ]

cmdSetAnnotation   [line 1904]

mixed cmdSetAnnotation( string $mailboxName, string $entry, string $values)

Send the SETANNOTATION command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success
  • Since: 1.0
  • Access: public

Parameters:

string   $mailboxName     Mailbox name
string   $entry     Entry
string   $values     Value

[ Top ]

cmdSetQuota   [line 1620]

mixed cmdSetQuota( string $mailbox_name, [string $storageQuota = null], [string $messagesQuota = null])

Send the SETQUOTA command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or quota data on success
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     The mailbox name to query for quota data
string   $storageQuota     Sets the max number of bytes this mailbox can handle
string   $messagesQuota     Sets the max number of messages this mailbox can handle

[ Top ]

cmdSetQuotaRoot   [line 1683]

mixed cmdSetQuotaRoot( string $mailbox_name, [string $storageQuota = null], [string $messagesQuota = null])

Send the SETQUOTAROOT command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or quota data on success
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox_name     The mailbox name to query for quota data
string   $storageQuota     Sets the max number of bytes this mailbox can handle
string   $messagesQuota     Sets the max number of messages this mailbox can handle

[ Top ]

cmdSort   [line 1295]

mixed cmdSort( string $sort_cmd)

Send the SORT command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.1
  • Access: public

Parameters:

string   $sort_cmd     Sort command

[ Top ]

cmdStartTLS   [line 3751]

mixed cmdStartTLS( )

Return true if the TLS negotiation was successful
  • Return: true on success, PEAR_Error on failure
  • Access: public

[ Top ]

cmdStatus   [line 1055]

array cmdStatus( string $mailbox, mixed $request)

Send the STATUS Mailbox Command
  • Return: Returns a Parsed Response
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     The mailbox name
mixed   $request     The request status it could be an array or space separated string of MESSAGES | RECENT | UIDNEXT UIDVALIDITY | UNSEEN

[ Top ]

cmdStore   [line 1332]

mixed cmdStore( string $message_set, string $dataitem, string $value)

Send the STORE command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $message_set     The sessage_set
string   $dataitem     The way we store the flags FLAGS: replace the flags whith $value FLAGS.SILENT: replace the flags whith $value but don't return untagged responses +FLAGS: Add the flags whith $value +FLAGS.SILENT: Add the flags whith $value but don't return untagged responses -FLAGS: Remove the flags whith $value -FLAGS.SILENT: Remove the flags whith $value but don't return untagged responses
string   $value     Value

[ Top ]

cmdSubscribe   [line 942]

array cmdSubscribe( string $mailbox)

Send the SUSCRIBE Mailbox Command
  • Return: Returns an array containing the response
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     The mailbox name to suscribe.

[ Top ]

cmdUidCopy   [line 1410]

mixed cmdUidCopy( string $message_set, string $mailbox)

The UID COPY command
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $message_set     Msgset
string   $mailbox     Mailbox name

[ Top ]

cmdUidFetch   [line 1391]

mixed cmdUidFetch( string $msgset, string $fetchparam)

The UID FETH command
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $msgset     Msgset
string   $fetchparam     Fetchparm

[ Top ]

cmdUidSearch   [line 1482]

mixed cmdUidSearch( string $search_cmd)

Send the SEARCH command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $search_cmd     Search command

[ Top ]

cmdUidSort   [line 1504]

mixed cmdUidSort( string $sort_cmd)

Send the UID SORT command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.1
  • Access: public

Parameters:

string   $sort_cmd     Sort command

[ Top ]

cmdUidStore   [line 1442]

mixed cmdUidStore( string $message_set, string $dataitem, string $value)

Send the UID STORE command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $message_set     The sessage_set
string   $dataitem     The way we store the flags FLAGS: replace the flags whith $value FLAGS.SILENT: replace the flags whith $value but don't return untagged responses +FLAGS: Add the flags whith $value +FLAGS.SILENT: Add the flags whith $value but don't return untagged responses -FLAGS: Remove the flags whith $value -FLAGS.SILENT: Remove the flags whith $value but don't return untagged responses
string   $value     Value

[ Top ]

cmdUnsubscribe   [line 960]

mixed cmdUnsubscribe( string $mailbox)

Send the UNSUBSCRIBE Mailbox Command
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $mailbox     The mailbox name to unsubscribe

[ Top ]

cmdX   [line 1526]

mixed cmdX( string $atom, string $parameters)

Send the X command.
  • Return: Returns a PEAR_Error with an error message on any kind of failure, or true on success.
  • Since: 1.0
  • Access: public

Parameters:

string   $atom     Atom
string   $parameters     Parameters

[ Top ]

escape   [line 3837]

string escape( string $string, [boolean $force_quotes = false])

Escapes a string when it contains special characters (RFC3501)
  • Return: String atom, quoted-string or string literal
  • Todo: lists

Parameters:

string   $string     IMAP string
boolean   $force_quotes     Forces string quoting (for atoms)

[ Top ]

getCurrentMailbox   [line 265]

string getCurrentMailbox( )

get current mailbox name
  • Return: Returns the current mailbox
  • Since: 1.0
  • Access: public

[ Top ]

getDebugDialog   [line 294]

string getDebugDialog( )

get the debug dialog
  • Return: debug dialog
  • Access: public

[ Top ]

getLastCmdId   [line 250]

string getLastCmdId( )

get the last cmd ID
  • Return: Returns the last cmdId
  • Since: 1.0
  • Access: public

[ Top ]

getServerAuthMethods   [line 2053]

true getServerAuthMethods( )

tell if the server has capability $capability
  • Return: or false
  • Since: 1.0
  • Access: public

[ Top ]

getUnparsedResponse   [line 441]

boolean getUnparsedResponse( )

get the "returning of the unparsed response" feature status
  • Return: return if the unparsed response is returned or not
  • Since: 1.0
  • Access: public

[ Top ]

hasAclSupport   [line 2109]

true hasAclSupport( )

tell if the server has Quota support
  • Return: or false
  • Since: 1.0
  • Access: public

[ Top ]

hasAnnotateMoreSupport   [line 2123]

true hasAnnotateMoreSupport( )

tell if the server has support for the ANNOTATEMORE extension
  • Return: or false
  • Since: 1.0
  • Access: public

[ Top ]

hasCapability   [line 2073]

true hasCapability( string $capability)

tell if the server has capability $capability
  • Return: or false
  • Since: 1.0
  • Access: public

Parameters:

string   $capability     Capability

[ Top ]

hasQuotaSupport   [line 2095]

true hasQuotaSupport( )

tell if the server has Quota support
  • Return: or false
  • Since: 1.0
  • Access: public

[ Top ]

setDebug   [line 281]

nothing setDebug( [boolean $debug = true])

Sets the debuging information on or off
  • Since: 1.0
  • Access: public

Parameters:

boolean   $debug     Turn debug on (true) or off (false)

[ Top ]

setPrintErrors   [line 311]

nothing setPrintErrors( [boolean $printErrors = true])

Sets printed output of errors on or of
  • Since: 1.1
  • Access: public

Parameters:

boolean   $printErrors     true to turn on, false to turn off printed output

[ Top ]

setStreamContextOptions   [line 458]

nothing setStreamContextOptions( array $options)

set the options for a SSL/TLS connection (see documentation for stream_context_create)
  • Since: 1.1
  • Access: public

Parameters:

array   $options     The options for the SSL/TLS connection

[ Top ]

setTimeout   [line 474]

nothing setTimeout( int $timeout)

set the the timeout for the connection to the IMAP server.
  • Since: 1.1
  • Access: public

Parameters:

int   $timeout     The timeout

[ Top ]

setUnparsedResponse   [line 490]

nothing setUnparsedResponse( boolean $status)

set the "returning of the unparsed response" feature on or off
  • Since: 1.0
  • Access: public

Parameters:

boolean   $status     true: feature is on

[ Top ]

utf7Decode   [line 3670]

string utf7Decode( string $str)

Decode string from UTF7
  • Return: Decoded string
  • Access: public

Parameters:

string   $str     UTF7 encoded string

[ Top ]

utf7Encode   [line 3586]

string utf7Encode( string $str)

Encode string to UTF7
  • Return: UTF7 encoded string
  • Access: public

Parameters:

string   $str     String

[ Top ]

utf_7_decode   [line 3655]

string utf_7_decode( string $str)

Decode string from UTF7

Use utf7Decode() instead. This method is only for BC.

  • Return: Decoded string
  • Deprecated: Use utf7Decode() instead
  • Access: public

Parameters:

string   $str     UTF7 encoded string

[ Top ]

utf_7_encode   [line 3571]

string utf_7_encode( string $str)

Encode string to UTF7

Use utf7Encode() instead. This method is only for BC.

  • Return: UTF7 encoded string
  • Deprecated: Use utf7Encode() instead
  • Access: public

Parameters:

string   $str     String

[ Top ]

_createQuotedString   [line 2138]

string _createQuotedString( string $str)

Create a quoted string
  • Return: Quoted $str
  • Since: 1.0
  • Access: public

Parameters:

string   $str     String

[ Top ]


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