Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 3.9.x will end* 10 May 2021 (12 months).
  • Bug fixes for security issues in 3.9.x will end* 8 May 2023 (36 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Copyright 2009-2017 Horde LLC (http://www.horde.org/) See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Copyright: 2002 Richard Heyes
Copyright: 2009-2017 Horde LLC
License: http://www.horde.org/licenses/lgpl21 LGPL 2.1
File Size: 1543 lines (52 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Horde_Imap_Client_Socket_Pop3:: (52 methods):
  __get()
  _initCache()
  getIdsOb()
  _initCapability()
  _noop()
  _getNamespaces()
  _login()
  _connect()
  _tryLogin()
  _logout()
  _sendID()
  _getID()
  _setLanguage()
  _getLanguage()
  _openMailbox()
  _createMailbox()
  _deleteMailbox()
  _renameMailbox()
  _subscribeMailbox()
  _listMailboxes()
  _status()
  _append()
  _check()
  _close()
  _expunge()
  _search()
  _setComparator()
  _getComparator()
  _thread()
  _fetch()
  _fetchCmd()
  _pop3Cache()
  _processString()
  _vanished()
  _store()
  _copy()
  _setQuota()
  _getQuota()
  _getQuotaRoot()
  _setACL()
  _deleteACL()
  _getACL()
  _listACLRights()
  _getMyACLRights()
  _getMetadata()
  _setMetadata()
  _getSearchCache()
  resolveIds()
  _sendLine()
  _getResponse()
  _getSeqIds()
  _parseResponseCode()


Class: Horde_Imap_Client_Socket_Pop3  - X-Ref

An interface to a POP3 server using PHP functions.

It is an abstraction layer allowing POP3 commands to be used based on
IMAP equivalents.

This driver implements the following POP3-related RFCs:
<pre>
- STD 53/RFC 1939: POP3 specification
- RFC 2195: CRAM-MD5 authentication
- RFC 2449: POP3 extension mechanism
- RFC 2595/4616: PLAIN authentication
- RFC 2831: DIGEST-MD5 SASL Authentication (obsoleted by RFC 6331)
- RFC 3206: AUTH/SYS response codes
- RFC 4616: AUTH=PLAIN
- RFC 5034: POP3 SASL
- RFC 5802: AUTH=SCRAM-SHA-1
- RFC 6856: UTF8, LANG
</pre>

__get($name)   X-Ref
No description

_initCache($current = false)   X-Ref
No description

getIdsOb($ids = null, $sequence = false)   X-Ref
No description

_initCapability()   X-Ref
No description

_noop()   X-Ref
No description

_getNamespaces()   X-Ref


_login()   X-Ref
No description

_connect()   X-Ref
Connects to the server.


_tryLogin($method)   X-Ref
Authenticate to the POP3 server.

param: string $method  POP3 login method.

_logout()   X-Ref
No description

_sendID($info)   X-Ref


_getID()   X-Ref
Return implementation information from the POP3 server (RFC 2449 [6.9]).


_setLanguage($langs)   X-Ref


_getLanguage($list)   X-Ref


_openMailbox(Horde_Imap_Client_Mailbox $mailbox, $mode)   X-Ref


_createMailbox(Horde_Imap_Client_Mailbox $mailbox, $opts)   X-Ref


_deleteMailbox(Horde_Imap_Client_Mailbox $mailbox)   X-Ref


_renameMailbox(Horde_Imap_Client_Mailbox $old,Horde_Imap_Client_Mailbox $new)   X-Ref


_subscribeMailbox(Horde_Imap_Client_Mailbox $mailbox,$subscribe)   X-Ref


_listMailboxes($pattern, $mode, $options)   X-Ref
No description

_status($mboxes, $flags)   X-Ref

param: integer $flags   This driver only supports the options listed

_append(Horde_Imap_Client_Mailbox $mailbox, $data,$options)   X-Ref


_check()   X-Ref
No description

_close($options)   X-Ref
No description

_expunge($options)   X-Ref

param: array $options  Additional options. 'ids' has no effect in this

_search($query, $options)   X-Ref


_setComparator($comparator)   X-Ref


_getComparator()   X-Ref


_thread($options)   X-Ref


_fetch(Horde_Imap_Client_Fetch_Results $results,$queries)   X-Ref
No description

_fetchCmd(Horde_Imap_Client_Fetch_Results $results,$options)   X-Ref
Fetch data for a given fetch query.

param: Horde_Imap_Client_Fetch_Results $results  Fetch results.
param: array $options                            Fetch query options.

_pop3Cache($type, $index = self::MBOX_CACHE, $data = null)   X-Ref
Retrieve locally cached message data.

param: string $type    Either 'hdr', 'hdrob', 'msg', 'size', 'stat',
param: integer $index  The message index.
param: mixed $data     Additional information needed.
return: mixed  The cached data. 'msg' returns a stream resource. All

_processString($str, $opts)   X-Ref
Process a string response based on criteria options.

param: string $str  The original string.
param: array $opts  The criteria options.
return: string  The requested string.

_vanished($modseq, Horde_Imap_Client_Ids $ids)   X-Ref


_store($options)   X-Ref

param: array $options  Additional options. This driver does not support

_copy(Horde_Imap_Client_Mailbox $dest, $options)   X-Ref


_setQuota(Horde_Imap_Client_Mailbox $root, $options)   X-Ref


_getQuota(Horde_Imap_Client_Mailbox $root)   X-Ref


_getQuotaRoot(Horde_Imap_Client_Mailbox $mailbox)   X-Ref


_setACL(Horde_Imap_Client_Mailbox $mailbox, $identifier,$options)   X-Ref


_deleteACL(Horde_Imap_Client_Mailbox $mailbox, $identifier)   X-Ref


_getACL(Horde_Imap_Client_Mailbox $mailbox)   X-Ref


_listACLRights(Horde_Imap_Client_Mailbox $mailbox,$identifier)   X-Ref


_getMyACLRights(Horde_Imap_Client_Mailbox $mailbox)   X-Ref


_getMetadata(Horde_Imap_Client_Mailbox $mailbox,$entries, $options)   X-Ref


_setMetadata(Horde_Imap_Client_Mailbox $mailbox, $data)   X-Ref


_getSearchCache($type, $options)   X-Ref
No description

resolveIds(Horde_Imap_Client_Mailbox $mailbox,Horde_Imap_Client_Ids $ids, $convert = 0)   X-Ref
No description

_sendLine($cmd, $options = array()   X-Ref
Perform a command on the server. A connection to the server must have
already been made.

param: string $cmd     The command to execute.
param: array $options  Additional options:
return: array  See _getResponse().

_getResponse($multiline = false)   X-Ref
Gets a line from the stream and parses it.

param: mixed $multiline  'array', 'none', 'stream', or null.
return: array  An array with the following keys:

_getSeqIds(Horde_Imap_Client_Ids $ids)   X-Ref
Returns a list of sequence IDs.

param: Horde_Imap_Client_Ids $ids  The ID list.
return: array  A list of sequence IDs.

_parseResponseCode($text)   X-Ref
Parses response text for response codes (RFC 2449 [8]).

param: string $text  The response text.
return: object  An object with the following properties: