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

Class: Net_Cyrus

Source Location: /Net_Cyrus-0.3.2/Net/Cyrus.php

Class Overview

Net_IMAP
   |
   --Net_Cyrus

Net_Cyrus class provides an API for the administration of Cyrus IMAP servers.


Author(s):

Methods


Inherited Variables

Inherited Methods


Class Details

[line 30]
Net_Cyrus class provides an API for the administration of Cyrus IMAP servers.

please see: http://asg.web.cmu.edu/cyrus/imapd/



[ Top ]


Method Detail

Net_Cyrus (Constructor)   [line 72]

Net_Cyrus Net_Cyrus( [string $user = null], [string $pass = null], [string $host = 'localhost'], [integer $port = 143], [integer $timeout = 5])

Constructor.

Parameters:

string   $user   —  Cyrus admin username
string   $pass   —  Cyrus admin password
string   $host   —  Server hostname
integer   $port   —  Server port number
integer   $timeout   —  Connection timeout value

[ Top ]

connect   [line 87]

void connect( [ $user = null], [ $pass = null], [ $host = null], [ $port = null], [ $method = true])

Connects and logs into the server. Uses the Auth_SASL library to produce the LOGIN command if available
  • Access: public

Parameters:

   $user   — 
   $pass   — 
   $host   — 
   $port   — 
   $method   — 

[ Top ]

copyMail   [line 544]

mixed copyMail( string $from, string $to)

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

Parameters:

string   $from   —  From mailbox name
string   $to   —  To mailbox name

[ Top ]

copyQuota   [line 221]

void copyQuota( string $from, string $to)

Copies a quota from one mailbox to another.
  • Access: public

Parameters:

string   $from   —  Mailbox to copy quota from
string   $to   —  Mailbox to set quota on

[ Top ]

createMailbox   [line 311]

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

Creates a mailbox.
  • Return: True on success, PEAR error otherwise
  • Access: public

Parameters:

string   $mailbox   —  Name of mailbox to create
array   $options   —  options to pass to create

[ Top ]

createUser   [line 451]

mixed createUser( string $user_name, [array $options = null])

creates a user. Use this instead of createMailbox
  • Return: true on Success/PearError on Failure
  • Access: public

Parameters:

string   $user_name   —  the user to create
array   $options   —  options to pass to createMailbox

[ Top ]

deleteACL   [line 294]

mixed deleteACL( string $mailbox, string $user)

Deletes ACL from a mailbox.
  • Return: True on success, PEAR_Error otherwise
  • Access: public

Parameters:

string   $mailbox   —  Name of mailbox
string   $user   —  Username to remove ACL from

[ Top ]

deleteMailbox   [line 347]

mixed deleteMailbox( string $mailbox)

Deletes a mailbox.
  • Return: True on success, PEAR error otherwise
  • Access: public

Parameters:

string   $mailbox   —  Name of mailbox to delete

[ Top ]

deleteUser   [line 433]

mixed deleteUser( string $user_name)

deletes a user. Use this instead of deleteMailbox
  • Return: true on Success/PearError on Failure
  • Access: public

Parameters:

string   $user_name   —  the user to deletes

[ Top ]

disconnect   [line 139]

void disconnect( )

Ends the session. Issues the LOGOUT command first.
  • Access: public

[ Top ]

getACL   [line 242]

string getACL( string $mailbox, [string $user = null])

Retrieves details of current ACL.
  • Return: Access stuff
  • Access: public

Parameters:

string   $mailbox   —  Name of mailbox
string   $user   —  Optional user to get ACL for

[ Top ]

getFolderList   [line 365]

array getFolderList( [ $folderMask = null], string $prepend)

Returns a list of folders for a particular user.
  • Return: Array of folders matched
  • Access: public

Parameters:

string   $prepend   —  Optional string to prepend
   $folderMask   — 

[ Top ]

getQuota   [line 192]

mixed getQuota( string $mailbox)

Returns quota details.
  • Return: Array of current usage and quota limit or false on failure.
  • Access: public

Parameters:

string   $mailbox   —  Mailbox to get quota info for.

[ Top ]

getUserList   [line 381]

array getUserList( )

Returns a list of users.
  • Return: Array of users found
  • Access: public

[ Top ]

getUserName   [line 407]

void getUserName( string $user_name, [boolean $append_userPart = true])

Parses a user name
  • Since: 1.0
  • Access: public

Parameters:

string   $user_name   —  the user parse
boolean   $append_userPart   —  true if the method appends 'user.' to the user name

[ Top ]

renameMailbox   [line 327]

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

Renames a mailbox.
  • Return: True on success, PEAR error otherwise
  • Access: public

Parameters:

string   $mailbox   —  Name of mailbox to rename
string   $newname   —  New name of mailbox
array   $options   —  options to pass to rename

[ Top ]

renameUser   [line 490]

mixed renameUser( string $oldUser, string $newUser, [array $options = null])

Renames a user. This is here since the RENAME command is not allowed on a user's INBOX (ie. the user.<username> mailbox). Supplied args can be either with or without the "user." at the beginning.
  • Return: true on Success/PearError on Failure
  • Access: public

Parameters:

string   $oldUser   —  Name of user to rename
string   $newUser   —  New name of user
array   $options   —  options to pass to createMailbox and renameMailbox

[ Top ]

setACL   [line 276]

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

Sets ACL on a mailbox.
  • Return: True on success, PEAR_Error otherwise
  • Access: public

Parameters:

string   $mailbox   —  Name of mailbox
string   $user   —  Username to apply ACL to
string   $acl   —  The ACL

[ Top ]

setQuota   [line 209]

mixed setQuota( string $mailbox, integer $quota)

Sets a quota.
  • Return: True on success, PEAR_Error otherwise

Parameters:

string   $mailbox   —  Mailbox to get quota info for
integer   $quota   —  The quota to set

[ Top ]

userExists   [line 470]

boolean userExists( $user_name, string $mailbox)

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

Parameters:

string   $mailbox   —  user name to check existance
   $user_name   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:39:24 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.