Net_IMAP Net_IMAP(
string
0, int
1, string
2
)
|
|
Constructor
Instantiates a new Net_SMTP object, overriding any defaults with parameters that are passed in.
Parameters:
|
string |
0: |
The server to connect to. |
|
int |
1: |
The port to connect to. |
|
string |
2: |
The value to give when sending EHLO or HELO. |
mixed addAnswered(
mixed
$msg_id
)
|
|
adds the Answered flag (\Answered) to the selected messages
Parameters:
|
mixed |
$msg_id: |
the message list or string "all" for all |
API Tags:
| Return: | true on success/PearError on failure |
mixed addDeleted(
mixed
$msg_id
)
|
|
adds the Deleted flag (\Deleted) to the selected messages
Parameters:
|
mixed |
$msg_id: |
the message list or string "all" for all |
API Tags:
| Return: | true on success/PearError on failure |
mixed addDraft(
mixed
$msg_id
)
|
|
adds the Draft flag (\Draft) to the selected messages
Parameters:
|
mixed |
$msg_id: |
the message list or string "all" for all |
API Tags:
| Return: | true on success/PearError on failure |
mixed addFlagged(
mixed
$msg_id
)
|
|
adds the Flagged flag (\Flagged) to the selected messages
Parameters:
|
mixed |
$msg_id: |
the message list or string "all" for all |
API Tags:
| Return: | true on success/PearError on failure |
mixed addFlags(
mixed
$msg_id, mixed
$flags
)
|
|
adds flags to the selected messages
Parameters:
|
mixed |
$flags: |
flags to set (space separated String or array) |
|
mixed |
$msg_id: |
the message list or string "all" for all |
API Tags:
| Return: | true on success/PearError on failure |
mixed addSeen(
mixed
$msg_id
)
|
|
adds the Seen flag (\Seen) to the selected messages
Parameters:
|
mixed |
$msg_id: |
the message list or string "all" for all |
API Tags:
| Return: | true on success/PearError on failure |
mixed appendMessage(
string
$rfc_message, [string
$mailbox = null], [
$flags_list = '']
)
|
|
Appends a mail to a mailbox
Parameters:
|
string |
$rfc_message: |
the message to append in RFC822 format |
|
string |
$mailbox: |
mailbox name to append to |
|
|
$flags_list: |
|
API Tags:
| Return: | true on Success/PearError on Failure |
Information Tags:
true connect(
string
$host, string
$port
)
|
|
Attempt to connect to the IMAP server located at $host $port
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 |
API Tags:
| Return: | on success or PEAR_Error |
| Access: | public |
Information Tags:
mixed copyMessages(
string
$dest_mailbox, [mixed
$msg_id = null], [string
$source_mailbox = null], [bool
$uidCopy = false]
)
|
|
Copies mail from one folder to another
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 |
|
bool |
$uidCopy: |
msg_id contains UID's instead of Message Sequence Number if set to true |
API Tags:
| Return: | true on Success/PearError on Failure |
Information Tags:
mixed createMailbox(
string
$mailbox, [array
$options = null]
)
|
|
Creates the mailbox $mailbox
Parameters:
|
string |
$mailbox: |
mailbox name to create |
|
array |
$options: |
options to pass to create |
API Tags:
| Return: | true on Success/PearError on Failure |
Information Tags:
mixed deleteACL(
string
$mailbox_name, string
$user
)
|
|
deletes the ACL on a mailbox
Parameters:
|
string |
$mailbox_name: |
the mailbox |
|
string |
$user: |
user to set the ACL |
API Tags:
| Return: | True on success, or PEAR_Error on false |
| Access: | public |
Information Tags:
void deleteAnnotation(
$entry,
$values, [
$mailbox_name = null]
)
|
|
Parameters:
|
|
$entry: |
|
|
|
$values: |
|
|
|
$mailbox_name: |
|
mixed deleteMailbox(
string
$mailbox
)
|
|
Deletes the mailbox $mailbox
Parameters:
|
string |
$mailbox: |
mailbox name to delete |
API Tags:
| Return: | true on Success/PearError on Failure |
Information Tags:
void deleteMessages(
[
$msg_id = null], [
$uidStore = false]
)
|
|
Parameters:
void deleteMsg(
$msg_id
)
|
|
Parameters:
void disconnect(
[
$expungeOnExit = false]
)
|
|
Parameters:
void examineMailbox(
$mailbox
)
|
|
Parameters:
****************************************************************
* ** * MISC METHODS ** * ** ****************************************************************
string getACL(
[string
$mailbox_name = null]
)
|
|
get the Access Control List details
Parameters:
|
string |
$mailbox_name: |
Mailbox to get ACL info. |
API Tags:
| Return: | on success or PEAR_Error |
| Access: | public |
Information Tags:
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
Parameters:
|
string |
$mailbox_name: |
the mailbox to query rights |
|
|
$user: |
|
API Tags:
| Return: | string contailing the list of rights on success, or PEAR_Error on failure |
| Access: | public |
Information Tags:
void getAnnotation(
$entries,
$values, [
$mailbox_name = null]
)
|
|
Parameters:
|
|
$entries: |
|
|
|
$values: |
|
|
|
$mailbox_name: |
|
void getBody(
$msg_id, [
$uidFetch = false]
)
|
|
Parameters:
void getBodyPart(
$msg_id,
$partId, [
$uidFetch = false]
)
|
|
Parameters:
|
|
$msg_id: |
|
|
|
$partId: |
|
|
|
$uidFetch: |
|
void getEnvelope(
[
$mailbox = ''], [
$msg_id = null], [
$uidFetch = false]
)
|
|
Parameters:
|
|
$mailbox: |
|
|
|
$msg_id: |
|
|
|
$uidFetch: |
|
mixed getFlags(
[mixes
$msg_id = null]
)
|
|
Lists the flags of the selected messages
Parameters:
|
mixes |
$msg_id: |
the message list |
API Tags:
| Return: | array on Success/PearError on Failure |
Information Tags:
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
Parameters:
API Tags:
| Return: | the hierarchy delimiter |
| Access: | public |
Information Tags:
void getListing(
[
$msg_id = null]
)
|
|
Parameters:
mixed getMailboxes(
[
$reference = ''], [string
$restriction_search = 0], [string
$returnAttributes = false], string
$mailbox_base
)
|
|
Returns an array containing the names of the selected mailboxes
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: |
|
API Tags:
| Return: | true on Success/PearError on Failure |
Information Tags:
void getMailboxSize(
[
$mailbox = '']
)
|
|
Parameters:
void getMessages(
[
$msg_id = null], [
$indexIsMessageNumber = true]
)
|
|
Parameters:
|
|
$msg_id: |
|
|
|
$indexIsMessageNumber: |
|
void getMessagesList(
[
$msg_id = null]
)
|
|
Parameters:
assoc getMessagesQuota(
[string
$mailbox_name = null]
)
|
|
Returns MESSAGES quota details
Parameters:
|
string |
$mailbox_name: |
Mailbox to get quota info. |
API Tags:
| Return: | array contaning the quota info on success or PEAR_Error |
| Access: | public |
Information Tags:
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
Parameters:
|
string |
$mailbox_name: |
the mailbox to query rights |
API Tags:
| Return: | string contailing the list of rights on success, or PEAR_Error on failure |
| Access: | public |
Information Tags:
mixed getNamespace(
string
$rfc_message, string
$mailbox
)
|
|
Appends a mail to a mailbox
Parameters:
|
string |
$rfc_message: |
the message to append in RFC822 format |
|
string |
$mailbox: |
mailbox name to append to |
API Tags:
| Return: | true on Success/PearError on Failure |
Information Tags:
void getNumberOfMessages(
[
$mailbox = '']
)
|
|
Parameters:
void getNumberOfRecentMessages(
[
$mailbox = '']
)
|
|
Parameters:
void getNumberOfUnSeenMessages(
[
$mailbox = '']
)
|
|
Parameters:
void getParsedHeaders(
$msg_id, [
$keysToUpper = false], [
$part_id = ''], [
$uidFetch = false]
)
|
|
Parameters:
|
|
$msg_id: |
|
|
|
$keysToUpper: |
|
|
|
$part_id: |
|
|
|
$uidFetch: |
|
void getRawHeaders(
$msg_id, [
$part_id = ''], [
$uidFetch = false]
)
|
|
Parameters:
|
|
$msg_id: |
|
|
|
$part_id: |
|
|
|
$uidFetch: |
|
***************************************************
*******************************************************
void getStatus(
[
$mailbox = '']
)
|
|
Parameters:
assoc getStorageQuota(
[string
$mailbox_name = null]
)
|
|
Returns STORAGE quota details
Parameters:
|
string |
$mailbox_name: |
Mailbox to get quota info. |
API Tags:
| Return: | array contaning the quota info on success or PEAR_Error |
| Access: | public |
Information Tags:
assoc getStorageQuotaRoot(
[string
$mailbox_name = null]
)
|
|
Returns STORAGE quota details
Parameters:
|
string |
$mailbox_name: |
Mailbox to get quota info. |
API Tags:
| Return: | array contaning the quota info on success or PEAR_Error |
| Access: | public |
Information Tags:
void getStructure(
$msg_id, [
$uidFetch = false]
)
|
|
Parameters:
void getSummary(
[
$msg_id = null], [
$uidFetch = false]
)
|
|
Parameters:
void hasFlag(
$message_nro,
$flag
)
|
|
Parameters:
mixed isAnswered(
mixes
$message_nro
)
|
|
check the Answered flag
Parameters:
|
mixes |
$message_nro: |
the message to check |
API Tags:
| Return: | true or false if the flag is sert PearError on Failure |
Information Tags:
mixed isDeleted(
mixes
$message_nro
)
|
|
check the Deleted flag
Parameters:
|
mixes |
$message_nro: |
the message to check |
API Tags:
| Return: | true or false if the flag is sert PearError on Failure |
Information Tags:
mixed isDraft(
mixes
$message_nro
)
|
|
check the Draft flag
Parameters:
|
mixes |
$message_nro: |
the message to check |
API Tags:
| Return: | true or false if the flag is sert PearError on Failure |
Information Tags:
mixed isFlagged(
mixes
$message_nro
)
|
|
check the flagged flag
Parameters:
|
mixes |
$message_nro: |
the message to check |
API Tags:
| Return: | true or false if the flag is sert PearError on Failure |
Information Tags:
mixed isSeen(
mixes
$message_nro
)
|
|
check the Seen flag
Parameters:
|
mixes |
$message_nro: |
the message to check |
API Tags:
| Return: | true or false if the flag is sert PearError on Failure |
Information Tags:
mixed listsubscribedMailboxes(
[
$reference = ''], [
$restriction_search = 0], [
$returnAttributes = false], string
$mailbox_base, string
$mailbox_name
)
|
|
Lists the subscription to mailboxes
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: |
|
API Tags:
| Return: | true on Success/PearError on Failure |
Information Tags:
true login(
string
$user, string
$pass, [string
$useauthenticate = true], [boolean
$selectMailbox = true]
)
|
|
Attempt to authenticate to the IMAP server.
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) |
API Tags:
| Return: | on success or PEAR_Error |
| Access: | public |
Information Tags:
boolean mailboxExist(
string
$mailbox
)
|
|
check if the mailbox name exists
Parameters:
|
string |
$mailbox: |
mailbox name to check existance |
API Tags:
| Return: | true on Success/false on Failure |
Information Tags:
void numMsg(
[
$mailbox = null]
)
|
|
Parameters:
mixed removeAnswered(
mixed
$msg_id
)
|
|
remove the Answered flag (\Answered) from the selected messages
Parameters:
|
mixed |
$msg_id: |
the message list or string "all" for all |
API Tags:
| Return: | true on success/PearError on failure |
mixed removeDeleted(
mixed
$msg_id
)
|
|
remove the Deleted flag (\Deleted) from the selected messages
Parameters:
|
mixed |
$msg_id: |
the message list or string "all" for all |
API Tags:
| Return: | true on success/PearError on failure |
mixed removeDraft(
mixed
$msg_id
)
|
|
remove the Draft flag (\Draft) from the selected messages
Parameters:
|
mixed |
$msg_id: |
the message list or string "all" for all |
API Tags:
| Return: | true on success/PearError on failure |
mixed removeFlagged(
mixed
$msg_id
)
|
|
remove the Flagged flag (\Flagged) from the selected messages
Parameters:
|
mixed |
$msg_id: |
the message list or string "all" for all |
API Tags:
| Return: | true on success/PearError on failure |
mixed removeFlags(
mixed
$msg_id, mixed
$flags
)
|
|
remove flags from the selected messages
Parameters:
|
mixed |
$flags: |
flags to remove (space separated string or array) |
|
mixed |
$msg_id: |
the message list or string "all" for all |
API Tags:
| Return: | true on success/PearError on failure |
mixed removeSeen(
mixed
$msg_id
)
|
|
remove the Seen flag (\Seen) from the selected messages
Parameters:
|
mixed |
$msg_id: |
the message list or string "all" for all |
API Tags:
| Return: | true on success/PearError on failure |
mixed renameMailbox(
$oldmailbox,
$newmailbox, [array
$options = null], string
$mailbox
)
|
|
Renames the mailbox $mailbox
Parameters:
|
string |
$mailbox: |
mailbox name to rename |
|
array |
$options: |
options to pass to rename |
|
|
$oldmailbox: |
|
|
|
$newmailbox: |
|
API Tags:
| Return: | true on Success/PearError on Failure |
Information Tags:
void search(
$search_list, [
$uidSearch = false]
)
|
|
Parameters:
|
|
$search_list: |
|
|
|
$uidSearch: |
|
void selectMailbox(
$mailbox
)
|
|
Parameters:
mixed setACL(
string
$mailbox_name, string
$user, string
$acl
)
|
|
Set ACL on a mailbox
Parameters:
|
string |
$mailbox_name: |
the mailbox |
|
string |
$user: |
user to set the ACL |
|
string |
$acl: |
ACL list |
API Tags:
| Return: | True on success, or PEAR_Error on false |
| Access: | public |
Information Tags:
void setAnnotation(
$entry,
$values, [
$mailbox_name = null]
)
|
|
****************************************************************
* ** * ANNOTATEMORE METHODS ** * ** ****************************************************************
Parameters:
|
|
$entry: |
|
|
|
$values: |
|
|
|
$mailbox_name: |
|
mixed setFlags(
mixed
$msg_id, mixed
$flags, [string
$mod = 'set'], [$uidStore
$uidStore = false]
)
|
|
Sets the flags of the selected messages
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 |
|
$uidStore |
$uidStore: |
bool msg_id contains UID's instead of Message Sequence Number if set to true |
API Tags:
| Return: | true on success/PearError on failure |
true setMessagesQuota(
string
$mailbox_name,
$quota
)
|
|
sets MESSAGES quota details
Parameters:
|
string |
$mailbox_name: |
Mailbox to get quota info. |
|
|
$quota: |
|
API Tags:
| Return: | on success or PEAR_Error |
| Access: | public |
Information Tags:
true setStorageQuota(
string
$mailbox_name,
$quota
)
|
|
sets STORAGE quota details
Parameters:
|
string |
$mailbox_name: |
Mailbox to get quota info. |
|
|
$quota: |
|
API Tags:
| Return: | on success or PEAR_Error |
| Access: | public |
Information Tags:
mixed subscribeMailbox(
[string
$mailbox = null]
)
|
|
Subscribes to the selected mailbox
Parameters:
|
string |
$mailbox: |
mailbox name to subscribe |
API Tags:
| Return: | true on Success/PearError on Failure |
Information Tags:
mixed unsubscribeMailbox(
[string
$mailbox = null]
)
|
|
Removes the subscription to a mailbox
Parameters:
|
string |
$mailbox: |
mailbox name to unsubscribe |
API Tags:
| Return: | true on Success/PearError on Failure |
Information Tags:
void _getSearchListFromArray(
$arr
)
|
|
Parameters:
void _parseStructureApplicationArray(
$_structure,
&$_mimeParts,
$_partID
)
|
|
Parameters:
|
|
$_structure: |
|
|
|
&$_mimeParts: |
|
|
|
$_partID: |
|
void _parseStructureArray(
$_structure,
&$_mimeParts, [
$_partID = '']
)
|
|
Parameters:
|
|
$_structure: |
|
|
|
&$_mimeParts: |
|
|
|
$_partID: |
|
void _parseStructureCommonFields(
&$_structure
)
|
|
Parameters:
void _parseStructureImageArray(
$_structure,
&$_mimeParts,
$_partID
)
|
|
Parameters:
|
|
$_structure: |
|
|
|
&$_mimeParts: |
|
|
|
$_partID: |
|
void _parseStructureMessageArray(
$_structure,
&$_mimeParts,
$_partID
)
|
|
Parameters:
|
|
$_structure: |
|
|
|
&$_mimeParts: |
|
|
|
$_partID: |
|
void _parseStructureMultipartArray(
$_structure,
&$_mimeParts,
$_partID, [
$_parentIsMessage = false]
)
|
|
Parameters:
|
|
$_structure: |
|
|
|
&$_mimeParts: |
|
|
|
$_partID: |
|
|
|
$_parentIsMessage: |
|
void _parseStructureTextArray(
$_structure,
&$_mimeParts,
$_partID
)
|
|
Parameters:
|
|
$_structure: |
|
|
|
&$_mimeParts: |
|
|
|
$_partID: |
|