EmaiIMAP.h File ReferenceIMAP functionality. More...
#include <EmaiTypes.h>
#include <EmaiErrors.h>
#include <EmaiMessage.h>
#include <EmaiProxy.h>
Go to the source code of this file.
|
Classes |
struct | EmaiFlags |
| This structure is used for as for setting, so and for retrieving the (mailbox / message) flags, passed to / from the server. The strusture is used for both mailbox (for example: SELECT and EXAMINE commands) and message related functions (for example: APPEND and STORE commands). The flag list identifies the applicable flags (at least the standard defined flags, acording to RFC 2501). Custom flags can also exist, depending of client implementation. More...
|
struct | EmaiUidPlus |
| used for appenduid and copyuid response codes RFC4315 More...
|
struct | EmaiResponseText |
| EmaiResponseText structure.
This structure contains optional response codes and its parameters. More...
|
struct | EmaiStatusResponse |
| EmaiStatusResponse structure is used as a part of EmaiResponse structure, and carries the actual IMAP response code and explanation text. More...
|
struct | EmaiCapabilityResponse |
| This structure is used as a part of EmaiResponse structure, and carries the actual response returned by the server for the CAPABILITY command. More...
|
struct | EmaiListResponse |
| This response is returned by server for LIST and LSUB commands.
LIST command returns a single name that matches the LIST specification. There can be multiple LIST responses for a single LIST command. The name represents an unambiguous left-to-right hierarchy, and MUST be valid for use as a reference in LIST and LSUB commands. Unless is indicated, the name MUST also be valid as an argument for commands, such as SELECT, that accept mailbox names.
LSUB command returns a single name that matches the LSUB specification. There can be multiple LSUB responses for a single LSUB command. The data is identical in format to the LIST response. More...
|
struct | EmaiMailboxStatusResponse |
| The STATUS response occurs as a result of the STATUS command. It returns the mailbox name that matches the STATUS specification and the requested mailbox status information. More...
|
struct | EmaiSearchResponse |
| This response is returned by server for SEARCH and UID SEARCH commands. The number(s) refer to those messages that match the search criteria. For SEARCH, these are message sequence numbers; for UID SEARCH, these are unique identifiers. More...
|
struct | EmaiNumberResponse |
| EmaiNumberResponse is a structure common for several response types, such as EmaiExistsResponse, EmaiRecentResponse and EmaiExpungeResponse. More...
|
struct | EmaiBodySectionData |
| EmaiBodySectionData is used as a member of EmaiFetchResponse structure, which is returned by the server for FETCH command.
. More...
|
struct | EmaiRFC822Data |
| EmaiRFC822Data is used as a member of EmaiFetchResponse structure, which is returned by the server for FETCH and STORE commands. If "data" member is NULL, this means that attribute is not present in server response. More...
|
struct | EmaiFetchEnvelopeData |
| This structure represents the major message fields; it is used as a part of the EmaiBodyStructure and EmaiFetchResponse structures. Members of the structure are set to NULL if corresponding field is not returned by server (most probably it is absent in message). More...
|
struct | EmaiBodyStructure |
| EmaiBodyStructure. More...
|
struct | EmaiFetchResponse |
| This response is returned by server for FETCH and STORE commands. More...
|
struct | EmaiContinueRequestResponse |
| EmaiContinueRequestResponse. More...
|
struct | EmaiResponse |
| EmaiResponse structure is used to return the server reponse. More...
|
struct | EmaiImapCallbackData |
| EmaiImapCallbackData. More...
|
struct | EmaiImapCommandData |
| EmaiImapCommandData. More...
|
struct | EmaiSearchingKey |
| Search keys to be used with the EmaiSearchingCriteria structure, and apropriate seach functions. More...
|
struct | EmaiSearchingCriteria |
| Search criterias to be used with the EmaiImapSearch and Emai::ImapSession::Search functions. More...
|
struct | EmaiFetchMessageAttribute |
| Attributes for EmaiFetchMessageData structure. More...
|
struct | EmaiFetchMessageData |
| This structure identifies the message data to be fetched using the EmaiImapFetch or Emai::ImapSession::Fetch functions. More...
|
struct | EmaiStoreMessageData |
| This structure identifies the message data to be stored using the EmaiImapStore or Emai::ImapSession::Store functions. More...
|
Typedefs |
typedef EmaiOpaqueImapSession * | EmaiImapSession |
typedef EmaiOpaqueImapSequenceSet * | EmaiImapSequenceSet |
typedef EmaiListResponse | EmaiLsubResponse |
typedef EmaiFlags | EmaiFlagsResponse |
| This response is returned by server for SELECT and EXAMINE commands.
The flag list identifies the flags (at least the system defined flags), that are applicable for this mailbox. Flags other then system flags can also exist, depending of server implementation.
|
typedef EmaiNumberResponse | EmaiExistsResponse |
| This response is returned by server for EXISTS command. The EXISTS response reports the number of messages in the mailbox. This response occurs as a result of a SELECT or EXAMINE command, and if the size of the mailbox changes (e.g., new messages). The update from the EXISTS response MUST be recorded by the client.
|
typedef EmaiNumberResponse | EmaiRecentResponse |
| The RECENT response reports the number of messages with the \Recent flag set. This response occurs as a result of a SELECT or EXAMINE command, and if the size of the mailbox changes (e.g., new messages).
|
typedef EmaiNumberResponse | EmaiExpungeResponse |
| This response can be returned by server for most of the commands.
(see 7.4.1 section of the RFC 3501)
.
|
typedef const EmaiImapCallbackData * | inData |
typedef const EmaiImapCallbackData
void * | inUserData |
typedef const EmaiImapCommandData * | inCommandData |
typedef const EmaiImapCommandData
const EmaiResponse * | inResponse |
typedef const EmaiImapCommandData
const EmaiResponse void * | inUserData |
Enumerations |
enum | { EmaiImapMaxSequenceSetNumber = 0
} |
| Special number value for EmaiImapSequenceSetAddRange functions. The value can used to represent the largest number in use. For instance, EmaiImapSequenceSetAddRange(sequenceSet, 2, EmaiImapMaxSequenceSetNumber, EmaiNullOptions) will add 2:* range to the sequenceSet. Please note that enumeration for such sequence sets will not work. More...
|
enum | EmaiEnumImapSequenceSetGetNextNumberOptions { EmaiImapForward = 0,
EmaiImapBackward = 1
} |
| Options for EmaiImapSequenceGetNextNumber function. More...
|
enum | EmaiEnumImapStatusResponseFlags {
EmaiAnsweredFlag = 0x01,
EmaiFlaggedFlag = 0x02,
EmaiDeletedFlag = 0x04,
EmaiSeenFlag = 0x08,
EmaiDraftFlag = 0x10,
EmaiAllowKeywordsFlag = 0x20,
EmaiRecentFlag = 0x20
} |
| These are known flags, which are used as a values of EmaiFlags and EmaiFlagsResponse structures, for example:. More...
|
enum | EmaiEnumImapStatusResponseCodes {
EmaiNoCode,
EmaiXUserDefinedCode,
EmaiAlertCode,
EmaiBadCharsetCode,
EmaiCapabilityCode,
EmaiParseCode,
EmaiPermanentFlagsCode,
EmaiReadOnlyCode,
EmaiReadWriteCode,
EmaiTryCreateCode,
EmaiUIDNextCode,
EmaiUIDValidityCode,
EmaiUnseenCode,
EmaiAppendUIDCode,
EmaiCopyUIDCode
} |
| Status response codes.
Comments after constants show which member in the param union of EmaiResponseText structure is filled for the corresponding code value. More...
|
enum | EmaiEnumImapStatusResponseTypes {
EmaiImapOkResponse,
EmaiImapNoResponse,
EmaiImapBadResponse,
EmaiImapPreauthResponse,
EmaiImapByeResponse,
EmaiTaggedStatusResponse = 0x80000000,
EmaiImapTaggedOkResponse = EmaiTaggedStatusResponse | EmaiImapOkResponse
} |
| Status response types. More...
|
enum | EmaiEnumImapMailboxAttributes {
EmaiNoAttributes = 0x0000,
EmaiNoselectAttribute = 0x0001,
EmaiMarkedAttribute = 0x0002,
EmaiUnmarkedAttribute = 0x0003,
EmaiStandardAttibutesMask = 0x0003,
EmaiNoinferiorsAttribute = 0x0010,
EmaiHasChildren = 0x0100,
EmaiHasNoChildren = 0x0200,
EmaiChildrenAttibutesMask = 0x0300
} |
| Mailbox attributes. Four name attributes are defined:. More...
|
enum | EmaiEnumImapUndefinedStatus { EmaiUndefinedStatus = 0xFFFFFFFF
} |
| Special value EmaiMailboxStatusResponse members. More...
|
enum | EmaiEnumImapUndefinedOriginValue { EmaiUndefinedOriginValue = 0xFFFFFFFF
} |
| Special value EmaiBodySectionData dataOrigin member. More...
|
enum | EmaiEnumBodyType { EmaiMultipartBody,
EmaiBasicBody,
EmaiMessageBody,
EmaiTextBody
} |
| Message body type. More...
|
enum | EmaiEnumImapServerResponses {
EmaiUnrecognizedResponseType,
EmaiStatusResponseType,
EmaiCapabilityResponseType,
EmaiListResponseType,
EmaiLsubResponseType,
EmaiMailboxStatusResponseType,
EmaiSearchResponseType,
EmaiFlagsResponseType,
EmaiExistsResponseType,
EmaiRecentResponseType,
EmaiExpungeResponseType,
EmaiFetchResponseType,
EmaiContinueRequestResponseType
} |
| IMAP server response structures: response data Comments after constants show which member in the data union of EmaiResponse structure is filled for the corresponding responseCode value. More...
|
enum | EmaiEnumImapCallbackData { EmaiImapSelectorNormal = 0,
EmaiImapSelectorSending,
EmaiImapSelectorReceiving,
EmaiImapSelectorServerError
} |
| Values for selector member of EmaiImapCallbackData. More...
|
enum | EmaiEnumImapOperationCode {
EmaiImapConnectingToServer = 0,
EmaiImapConnectedToServer,
EmaiImapAuthenticating,
EmaiImapAuthenticated,
EmaiImapCreatingMailbox,
EmaiImapMailboxCreated,
EmaiImapDeletingMailbox,
EmaiImapMailboxDeleted,
EmaiImapSubsribingMailbox,
EmaiImapMailboxSubscribed,
EmaiImapUnSubsribingMailbox,
EmaiImapMailboxUnSubscribed,
EmaiImapRenamingMailbox,
EmaiImapMailboxRenamed,
EmaiImapRetrievingMailboxList,
EmaiImapMailboxListRetrieved,
EmaiImapExaminingMailbox,
EmaiImapMailboxExamined,
EmaiImapRetrievingMailboxStatus,
EmaiImapMailboxStatusRetrieved,
EmaiImapSelectingMailbox,
EmaiImapMailboxSelected,
EmaiImapClosingMailbox,
EmaiImapMailboxClosed,
EmaiImapChecking,
EmaiImapChecked,
EmaiImapAppendingMessage,
EmaiImapMessageAppended,
EmaiImapSearchingMessages,
EmaiImapMessageSearchFinished,
EmaiImapFetchingMessages,
EmaiImapMessagesFetched,
EmaiImapCopyingMessages,
EmaiImapMessagesCopied,
EmaiImapStoringMessagesData,
EmaiImapMessagesDataStored,
EmaiImapExpungingMessages,
EmaiImapMessagesExpunged,
EmaiImapSendingNOOP,
EmaiImapNOOPSent,
EmaiImapClosingConnection,
EmaiImapConnectionClosed
} |
| Constants for operation codes for smtp sessions. More...
|
enum | EmaiEnumImapUseSSLOption { EmaiImapUseSSLOption = 0x01
} |
| Options for EmaiImapSessionCreate function. More...
|
enum | EmaiEnumImapPorts { EmaiDefaultImapPort = 143,
EmaiDefaultImapSSLPort = 993
} |
| Constants for default IMAP ports. More...
|
enum | EmaiEnumImapAuthModes {
EmaiIMAPAuthAutomatic,
EmaiIMAPAuthLogin,
EmaiIMAPAuthPlain,
EmaiIMAPAuthCramMD5,
EmaiIMAPAuthNTLM,
EmaiIMAPAuthLoginCommand
} |
| Authentication modes for EmaiImapAuthenticate function. More...
|
enum | EmaiEnumImapMailboxStatus {
EmaiMessagesNumber = 0x01,
EmaiRecentMessages = 0x02,
EmaiUidNext = 0x04,
EmaiUidValidity = 0x08,
EmaiUnseenMessages = 0x10,
EmaiAllStatusData
} |
| Options to be used with EmaiImapMailboxStatus function. They define the status data items that can be requested. More...
|
enum | EmaiEnumImapExpungeOptions { EmaiImapNoCustomExpungeOption = 0x01
} |
| option for EmaiImapExpunge function. More...
|
enum | EmaiEnumImapUIDOptions { EmaiImapUIDOption = 0x01
} |
| UID option for COPY, FETCH, SEARCH and STORE commands. More...
|
enum | EmaiEnumImapSearchOptions {
EmaiSearchAll,
EmaiSearchAnswered,
EmaiSearchDeleted,
EmaiSearchDraft,
EmaiSearchFlagged,
EmaiSearchNew,
EmaiSearchOld,
EmaiSearchRecent,
EmaiSearchSeen,
EmaiSearchUnanswered,
EmaiSearchUndeleted,
EmaiSearchUndraft,
EmaiSearchUnflagged,
EmaiSearchUnseen,
EmaiSearchMessageSequence,
EmaiSearchUid,
EmaiSearchBefore,
EmaiSearchOn,
EmaiSearchSince,
EmaiSearchSentBefore,
EmaiSearchSentOn,
EmaiSearchSentSince,
EmaiSearchBcc,
EmaiSearchBody,
EmaiSearchCc,
EmaiSearchTo,
EmaiSearchFrom,
EmaiSearchKeyword,
EmaiSearchSubject,
EmaiSearchText,
EmaiSearchUnkeyword,
EmaiSearchHeader,
EmaiSearchLarger,
EmaiSearchSmaller,
EmaiSearchNot,
EmaiSearchOr,
EmaiSearchKeyList
} |
| Values for selector fields of the EmaiSearchingKey structure.
Comments after constants show which members of the "param" union should be filled for the corresponding selector value. More...
|
enum | EmaiEnumImapSearching { EmaiSearchingCriteriaType,
EmaiSearchingKeysType
} |
| Values for selector fields of the EmaiSearchingKey structure. More...
|
enum | EmaiEnumImapFetchAttribute {
EmaiFetchEnvelope,
EmaiFetchFlags,
EmaiFetchInternalDate,
EmaiFetchRFC822,
EmaiFetchRFC822Header,
EmaiFetchRFC822Size,
EmaiFetchRFC822Text,
EmaiFetchBody,
EmaiFetchBodyStructure,
EmaiFetchUid,
EmaiFetchBodySection,
EmaiFetchBodyPeek
} |
| Values for selector field of the EmaiFetchMessageAttribute structure.
Comments near constants shows which members in the "param" union should be filled for the corresponding selector value. More...
|
enum | EmaiEnumImapDataFetchOptions {
EmaiDataFetchAll,
EmaiDataFetchFull,
EmaiDataFetchFast,
EmaiDataFetchAttr,
EmaiDataFetchString
} |
| Values for selector field of the EmaiFetchMessageData structure.
Comments near constants shows which members in the "param" union should be filled for the corresponding selector value. More...
|
enum | EmaiEnumImapStoreOptions { EmaiStoreSetFlags,
EmaiStoreAddFlags,
EmaiStoreRemoveFlags,
EmaiStoreSilent = 0x10
} |
| Options for EmaiStoreMessageData structure. More...
|
enum | EmaiEnumImapDataStoreOptions { EmaiDataStoreAttr,
EmaiDataStoreString
} |
| Values for selector field of the EmaiFetchMessageData structure.
. More...
|
Functions |
| EmaiImapSequenceSetCreate (EmaiImapSequenceSet *outSequenceSet, EmaiOptions inOptions) |
| Creates empty message sequence set.
|
| EmaiImapSequenceSetAddNumber (EmaiImapSequenceSet inSequenceSet, EmaiUint32 inNumber, EmaiOptions inOptions) |
| Adds a number to the specified sequence set.
|
| EmaiImapSequenceSetRemoveNumber (EmaiImapSequenceSet inSequenceSet, EmaiUint32 inNumber, EmaiOptions inOptions) |
| Remove a number from the specified sequence set.
|
| EmaiImapSequenceSetAddRange (EmaiImapSequenceSet inSequenceSet, EmaiUint32 inMinNumber, EmaiUint32 inMaxNumber, EmaiOptions inOptions) |
| Adds a range of numbers to the specified sequence set.
|
| EmaiImapSequenceSetRemoveRange (EmaiImapSequenceSet inSequenceSet, EmaiUint32 inMinNumber, EmaiUint32 inMaxNumber, EmaiOptions inOptions) |
| Remove a range of numbers from the specified sequence set.
|
| EmaiImapSequenceSetAddSequenceSet (EmaiImapSequenceSet inSequenceSet, EmaiImapSequenceSet inSequenceSetToAdd, EmaiOptions inOptions) |
| Adds all numbers from a sequence set object to another sequence set.
|
| EmaiImapSequenceSetRemoveSequenceSet (EmaiImapSequenceSet inSequenceSet, EmaiImapSequenceSet inSequenceSetToRemove, EmaiOptions inOptions) |
| Remove all numbers contained in a sequence set object from another sequence set.
|
| EmaiImapSequenceSetGetCount (EmaiImapSequenceSet inSequenceSet, EmaiUint32 *outCount, EmaiOptions inOptions) |
| Retrieves count of numbers in sequence set.
|
| EmaiImapSequenceSetGetBounds (EmaiImapSequenceSet inSequenceSet, EmaiUint32 *outFirstNumber, EmaiUint32 *outLastNumber, EmaiOptions inOptions) |
| Retrieves first and/or last numbers in sequence set. EmaiErrIncorrectParameter error code will be returned by the function if outFirstNumber and outLastNumber are both NULL. EmaiErrIncorrectParameter is also returned is sequence set is empty.
|
| EmaiImapSequenceSetGetNextNumber (EmaiImapSequenceSet inSequenceSet, EmaiUint32 inNumber, EmaiUint32 *outNextNumber, EmaiOptions inOptions) |
| Retrieves previous or next numbers in sequence set. The function is designed for using in conjunction with EmaiImapSequenceSetGetBounds for iterating numbers stored in sequence set object. Note, the function do not require the inNumber parameter to be contained in sequence set, EmaiImapSequenceSetGetNextNumber will return nearest number from the sequense set.
|
| EmaiImapSequenceContainsNumber (EmaiImapSequenceSet inSequenceSet, EmaiUint32 inNumber, EmaiOptions inOptions) |
| Checks if number is contained in specified sequence set. The function returns EmaiErrNoErr if number is contained in the sequence set or EmaiErrIncorrectParameter otherwise.
|
typedef | EMAICALLBACKAPI (EmaiError, EmaiImapStatusCallback)(EmaiImapSession inSession |
| Status callback declaration for IMAP session.
|
typedef | EMAICALLBACKAPI (void, EmaiImapResponseCallback)(EmaiImapSession inSession |
| Response handling callback declaration for IMAP session.
|
| EmaiImapSessionCreate (EmaiImapSession *outSession, EmaiImapResponseCallback inResponseCallback, void *inResponseUserData, EmaiImapStatusCallback inStatusCallback, void *inStatusUserData, EmaiUint32 inTimeout, EmaiOptions inOptions) |
| Creates IMAP session object.
|
| EmaiImapConnect (EmaiImapSession inSession, EmaiConstUniCharPtr inMailServer, short inPort, EmaiOptions inOptions) |
| Connects IMAP session object to the specified mail server.
|
| EmaiImapConnectEx (EmaiImapSession inSession, EmaiConstUniCharPtr inMailServer, short inPort, const EmaiProxyInfo *inProxyInfo, void *inUserData, EmaiOptions inOptions) |
| Connects IMAP session object to the specified mail server.
|
| EmaiImapDisconnect (EmaiImapSession inSession, EmaiOptions inOptions) |
| Disconnects IMAP session object from mail server.
|
| EmaiImapNoop (EmaiImapSession inSession, EmaiOptions inOptions) |
| Can be used as a periodic poll for new messages or message status updates during a period of inactivity.
.
|
| EmaiImapCancel (EmaiImapSession inSession, EmaiOptions inOptions) |
| Marks IMAP session to be cancelled ASAP.
|
| EmaiImapAuthenticate (EmaiImapSession inSession, EmaiConstUniCharPtr inAccount, EmaiConstUniCharPtr inPassword, EmaiOptions inOptions) |
| Authenticates IMAP session.
|
| EmaiImapSelectMailbox (EmaiImapSession inSession, EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions) |
| The SELECT command selects a mailbox so that messages in the mailbox can be accessed. Only one mailbox can be selected at a time in a connection; simultaneous access to multiple mailboxes requires multiple connections. The SELECT command automatically deselects any currently selected mailbox before attempting the new selection. Consequently, if a mailbox is selected and a SELECT command that fails is attempted, no mailbox is selected.
.
|
| EmaiImapExamineMailbox (EmaiImapSession inSession, EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions) |
| The EXAMINE command is identical to SELECT and returns the same output; however, the selected mailbox is identified as read-only. No changes to the permanent state of the mailbox, including per-user state, are permitted; in particular, EXAMINE MUST NOT cause messages to lose the \Recent flag.
.
|
| EmaiImapCreateMailbox (EmaiImapSession inSession, EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions) |
| The CREATE command creates a mailbox with the given name. A positive response is returned only if a new mailbox with that name has been created. It is an error to attempt to create INBOX or a mailbox with a name that refers to an extant mailbox. Any error in creation will return an apropriate error code.
.
|
| EmaiImapDeleteMailbox (EmaiImapSession inSession, EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions) |
| The DELETE command permanently removes the mailbox with the given name. A positive response is returned only if the mailbox has been deleted. It is an error to attempt to delete INBOX or a mailbox name that does not exist.
.
|
| EmaiImapRenameMailbox (EmaiImapSession inSession, EmaiConstUniCharPtr inMailbox, EmaiConstUniCharPtr inNewMailboxName, EmaiOptions inOptions) |
| The RENAME command changes the name of a mailbox. A positive response is returned only if the mailbox has been renamed. It is an error to attempt to rename from a mailbox name that does not exist or to a mailbox name that already exists. Any error in renaming will return an apropriate error code.
.
|
| EmaiImapSubscribeMailbox (EmaiImapSession inSession, EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions) |
| The SUBSCRIBE command adds the specified mailbox name to the server's set of "active" or "subscribed" mailboxes as returned by the LSUB command. This command returns a positive response only if the subscription is successful.
.
|
| EmaiImapUnsubscribeMailbox (EmaiImapSession inSession, EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions) |
| The UNSUBSCRIBE command removes the specified mailbox name from the server's set of "active" or "subscribed" mailboxes as returned by the LSUB command. This command returns a positive response only if the unsubscription is successful.
.
|
| EmaiImapListMailboxes (EmaiImapSession inSession, EmaiConstUniCharPtr inReferenceName, EmaiConstUniCharPtr inWildcardedMailboxName, EmaiOptions inOptions) |
| The LIST command returns a subset of names from the complete set of all names available to the client. Zero or more untagged LIST replies are returned, containing the name attributes, hierarchy delimiter, and name; see the description of the LIST reply for more detail.
.
|
| EmaiImapListSubscribedMailboxes (EmaiImapSession inSession, EmaiConstUniCharPtr inReferenceName, EmaiConstUniCharPtr inWildcardedMailboxName, EmaiOptions inOptions) |
| The LSUB command returns a subset of names from the set of names that the user has declared as being "active" or "subscribed". Zero or more untagged LSUB replies are returned. The arguments to LSUB are in the same form as those for LIST.
.
|
| EmaiImapMailboxStatus (EmaiImapSession inSession, EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions) |
| The STATUS command requests the status of the indicated mailbox. It does not change the currently selected mailbox, nor does it affect the state of any messages in the queried mailbox (in particular, STATUS MUST NOT cause messages to lose the \Recent flag).
.
|
| EmaiImapAppendMessage (EmaiImapSession inSession, EmaiConstUniCharPtr inMailbox, const EmaiFlags *inMessageFlags, EmaiConstUniCharPtr inDateTime, EmaiMessage inMessage, EmaiOptions inOptions) |
| The APPEND command appends the new message to the end of the specified destination mailbox. This argument SHOULD be in the format of an [RFC-2822] message. 8-bit characters are permitted in the message.
.
|
| EmaiImapCheck (EmaiImapSession inSession, EmaiOptions inOptions) |
| The CHECK command requests a checkpoint of the currently selected mailbox. A checkpoint refers to any implementation-dependent housekeeping associated with the mailbox (e.g., resolving the server's in-memory state of the mailbox with the state on its disk) that is not normally executed as part of each command. A checkpoint MAY take a non-instantaneous amount of real time to complete. If a server implementation has no such housekeeping considerations, CHECK is equivalent to NOOP.
.
|
| EmaiImapCloseMailbox (EmaiImapSession inSession, EmaiOptions inOptions) |
| Permanently removes all messages that have \Deleted flag set from the currently selected mailbox, and returns to the authenticated state from the selected state.
.
|
| EmaiImapExpunge (EmaiImapSession inSession, EmaiImapSequenceSet inMessageUIDSequence, EmaiOptions inOptions) |
| Permanently removes messages that have \Deleted flag set from the currently selected mailbox.
If inMessageUIDSequence parameter is NULL the function simply sends EXPUNGE command on server. Otherwise it sends UID EXPUNGE command (if it is supported by server) or perform following algorithm: 1) Find all messages marked \Deleted on the server. 2) Find all messages that must not be erased. 3) Temporarily remove \Deleted flag on all messages found in step 2. 4) Expunge the mailbox. 5) Restore \Deleted flag on all messages found when performing step 2. Note: ItÕs possible for another client to mark additional messages as deleted while this sequence is being performed. In this case, these additional messages will be expunged as well.
|
| EmaiImapSearch (EmaiImapSession inSession, const EmaiSearchingCriteria *inSearchingCriteria, EmaiOptions inOptions) |
| The SEARCH command searches the mailbox for messages that match the given searching criteria. Searching criteria consist of one or more search keys.
.
|
| EmaiImapFetch (EmaiImapSession inSession, EmaiImapSequenceSet inMessageSequence, const EmaiFetchMessageData *inMessageData, EmaiOptions inOptions) |
| The FETCH command retrieves data associated with a message in the mailbox. The data items to be fetched can be either a single atom or a parenthesized list.
.
|
| EmaiImapStore (EmaiImapSession inSession, EmaiImapSequenceSet inMessageSequence, const EmaiStoreMessageData *inMessageData, EmaiOptions inOptions) |
| The STORE command alters data associated with a message in the mailbox.
.
|
| EmaiImapCopy (EmaiImapSession inSession, EmaiImapSequenceSet inMessageSequence, EmaiConstUniCharPtr inMailbox, EmaiOptions inOptions) |
| The COPY command copies the specified message(s) to the end of the specified destination mailbox. The flags and internal date of the message(s) SHOULD be preserved, and the Recent flag SHOULD be set, in the copy.
.
|
Detailed Description
IMAP functionality.
- Version:
- mail.it library 1.0
- Author:
- (C) 2008-2010 Dacons LLP.
Definition in file EmaiIMAP.h.
Typedef Documentation
This response can be returned by server for most of the commands.
(see 7.4.1 section of the RFC 3501)
.
The EXPUNGE response reports that the specified message sequence number has been permanently removed from the mailbox. The message sequence number for each successive message in the mailbox is immediately decremented by 1, and this decrement is reflected in message sequence numbers in subsequent responses (including other untagged EXPUNGE responses). The EXPUNGE response also decrements the number of messages in the mailbox; it is not necessary to send an EXISTS response with the new value. As a result of the immediate decrement rule, message sequence numbers that appear in a set of successive EXPUNGE responses depend upon whether the messages are removed starting from lower numbers to higher numbers, or from higher numbers to lower numbers. For example, if the last 5 messages in a 9-message mailbox are expunged, a "lower to higher" server will send five untagged EXPUNGE responses for message sequence number 5, whereas a "higher to lower server" will send successive untagged EXPUNGE responses for message sequence numbers 9, 8, 7, 6, and 5. An EXPUNGE response MUST NOT be sent when no command is in progress, nor while responding to a FETCH, STORE, or SEARCH command. This rule is necessary to prevent a loss of synchronization of message sequence numbers between client and server. A command is not "in progress" until the complete command has been received; in particular, a command is not "in progress" during the negotiation of command continuation.
Note: UID FETCH, UID STORE, and UID SEARCH are different commands from FETCH, STORE, and SEARCH. An EXPUNGE response MAY be sent during a UID command.
The update from the EXPUNGE response MUST be recorded by the client.
- See also:
- EmaiResponse
Definition at line 783 of file EmaiIMAP.h.
This response is returned by server for SELECT and EXAMINE commands.
The flag list identifies the flags (at least the system defined flags), that are applicable for this mailbox. Flags other then system flags can also exist, depending of server implementation.
Combination of EmaiAnsweredFlag, EmaiFlaggedFlag, etc
Definition at line 670 of file EmaiIMAP.h.
The RECENT response reports the number of messages with the \Recent flag set. This response occurs as a result of a SELECT or EXAMINE command, and if the size of the mailbox changes (e.g., new messages).
Note: It is not guaranteed that the message sequence numbers of recent messages will be a contiguous range of the highest n messages in the mailbox (where n is the value reported by the RECENT response). Examples of situations in which this is not the case are: multiple clients having the same mailbox open (the first session to be notified will see it as recent, others will probably see it as non-recent), and when the mailbox is re-ordered by a non-IMAP agent. The only reliable way to identify recent messages is to look at message flags to see which have the \Recent flag set, or to do a SEARCH RECENT.
The update from the RECENT response MUST be recorded by the client.
- See also:
- Emai::ImapSession::SelectMailbox
EmaiImapSelectMailbox
Emai::ImapSession::ExamineMailbox
EmaiImapExamineMailbox
Definition at line 734 of file EmaiIMAP.h.
Enumeration Type Documentation
Special number value for EmaiImapSequenceSetAddRange functions. The value can used to represent the largest number in use. For instance, EmaiImapSequenceSetAddRange(sequenceSet, 2, EmaiImapMaxSequenceSetNumber, EmaiNullOptions) will add 2:* range to the sequenceSet. Please note that enumeration for such sequence sets will not work.
- See also:
- EmaiImapSequenceSetAddRange
- Enumerator:
-
EmaiImapMaxSequenceSetNumber |
|
Definition at line 94 of file EmaiIMAP.h.
Message body type.
- See also:
- EmaiBodyStructure
- Enumerator:
-
EmaiMultipartBody |
|
EmaiBasicBody |
|
EmaiMessageBody |
|
EmaiTextBody |
|
Definition at line 875 of file EmaiIMAP.h.
Authentication modes for EmaiImapAuthenticate function.
- See also:
- Emai::ImapSession::Authenticate
EmaiImapAuthenticate
- Enumerator:
-
EmaiIMAPAuthAutomatic |
Automatically tries all available mechanisms |
EmaiIMAPAuthLogin |
LOGIN authentification |
EmaiIMAPAuthPlain |
PLAIN authentification |
EmaiIMAPAuthCramMD5 |
Cram-MD5 authentification |
EmaiIMAPAuthNTLM |
NTLM authentification |
EmaiIMAPAuthLoginCommand |
LOGIN command authentification |
Definition at line 1412 of file EmaiIMAP.h.
Values for selector field of the EmaiFetchMessageData structure.
Comments near constants shows which members in the "param" union should be filled for the corresponding selector value.
- See also:
- Emai::ImapSession::Fetch
EmaiImapFetch
- Enumerator:
-
EmaiDataFetchAll |
none |
EmaiDataFetchFull |
none |
EmaiDataFetchFast |
none |
EmaiDataFetchAttr |
attr |
EmaiDataFetchString |
data |
Definition at line 2140 of file EmaiIMAP.h.
Values for selector field of the EmaiFetchMessageAttribute structure.
Comments near constants shows which members in the "param" union should be filled for the corresponding selector value.
- See also:
- Emai::ImapSession::Fetch
EmaiImapFetch
- Enumerator:
-
EmaiFetchEnvelope |
none |
EmaiFetchFlags |
|
EmaiFetchInternalDate |
|
EmaiFetchRFC822 |
|
EmaiFetchRFC822Header |
|
EmaiFetchRFC822Size |
|
EmaiFetchRFC822Text |
|
EmaiFetchBody |
|
EmaiFetchBodyStructure |
|
EmaiFetchUid |
|
EmaiFetchBodySection |
data |
EmaiFetchBodyPeek |
data |
Definition at line 2084 of file EmaiIMAP.h. 02085 {
02087 EmaiFetchEnvelope,
02088 EmaiFetchFlags,
02089 EmaiFetchInternalDate,
02090 EmaiFetchRFC822,
02091 EmaiFetchRFC822Header,
02092 EmaiFetchRFC822Size,
02093 EmaiFetchRFC822Text,
02094 EmaiFetchBody,
02095 EmaiFetchBodyStructure,
02096 EmaiFetchUid,
02097
02099 EmaiFetchBodySection,
02100
02102 EmaiFetchBodyPeek
02103 };
Mailbox attributes. Four name attributes are defined:.
\Noinferiors It is not possible for any child levels of hierarchy to exist under this name; no child levels exist now and none can be created in the future.
\Noselect It is not possible to use this name as a selectable mailbox.
\Marked The mailbox has been marked "interesting" by the server; the mailbox probably contains messages that have been added since the last time the mailbox was selected.
\Unmarked The mailbox does not contain any additional messages since the last time the mailbox was selected.
If it is not feasible for the server to determine whether or not the mailbox is "interesting", or if the name is a \Noselect name, the server SHOULD NOT send either \Marked or \Unmarked.
Refer to RFC3501 (chapter 7.2.2) for more information
The CHILDREN extension defines two new attributes that MAY be returned within a LIST response.
\HasChildren - The presence of this attribute indicates that the mailbox has child mailboxes.
\HasNoChildren - The presence of this attribute indicates that the mailbox has NO child mailboxes that are accessible to the currently authenticated user. If a mailbox has the \Noinferiors attribute, the \HasNoChildren attribute is redundant and SHOULD be omitted in the LIST response.
Refer to RFC3348 for more information
- See also:
- EmaiListResponse
- Enumerator:
-
EmaiNoAttributes |
EmaiNoselectAttribute |
EmaiNoselectAttribute |
EmaiNoselectAttribute |
EmaiMarkedAttribute |
EmaiMarkedAttribute |
EmaiUnmarkedAttribute |
EmaiUnmarkedAttribute |
EmaiStandardAttibutesMask |
|
EmaiNoinferiorsAttribute |
EmaiNoinferiorsAttribute |
EmaiHasChildren |
|
EmaiHasNoChildren |
|
EmaiChildrenAttibutesMask |
|
Definition at line 545 of file EmaiIMAP.h.
Options to be used with EmaiImapMailboxStatus function. They define the status data items that can be requested.
- See also:
- Emai::ImapSession::MailboxStatus
EmaiImapMailboxStatus
- Enumerator:
-
EmaiMessagesNumber |
|
EmaiRecentMessages |
|
EmaiUidNext |
|
EmaiUidValidity |
|
EmaiUnseenMessages |
|
EmaiAllStatusData |
|
Definition at line 1686 of file EmaiIMAP.h.
Constants for operation codes for smtp sessions.
- See also:
- EmaiImapCallbackData
- Enumerator:
-
EmaiImapConnectingToServer |
|
EmaiImapConnectedToServer |
|
EmaiImapAuthenticating |
|
EmaiImapAuthenticated |
|
EmaiImapCreatingMailbox |
|
EmaiImapMailboxCreated |
|
EmaiImapDeletingMailbox |
|
EmaiImapMailboxDeleted |
|
EmaiImapSubsribingMailbox |
|
EmaiImapMailboxSubscribed |
|
EmaiImapUnSubsribingMailbox |
|
EmaiImapMailboxUnSubscribed |
|
EmaiImapRenamingMailbox |
|
EmaiImapMailboxRenamed |
|
EmaiImapRetrievingMailboxList |
|
EmaiImapMailboxListRetrieved |
|
EmaiImapExaminingMailbox |
|
EmaiImapMailboxExamined |
|
EmaiImapRetrievingMailboxStatus |
|
EmaiImapMailboxStatusRetrieved |
|
EmaiImapSelectingMailbox |
|
EmaiImapMailboxSelected |
|
EmaiImapClosingMailbox |
|
EmaiImapMailboxClosed |
|
EmaiImapChecking |
|
EmaiImapChecked |
|
EmaiImapAppendingMessage |
|
EmaiImapMessageAppended |
|
EmaiImapSearchingMessages |
|
EmaiImapMessageSearchFinished |
|
EmaiImapFetchingMessages |
|
EmaiImapMessagesFetched |
|
EmaiImapCopyingMessages |
|
EmaiImapMessagesCopied |
|
EmaiImapStoringMessagesData |
|
EmaiImapMessagesDataStored |
|
EmaiImapExpungingMessages |
|
EmaiImapMessagesExpunged |
|
EmaiImapSendingNOOP |
|
EmaiImapNOOPSent |
|
EmaiImapClosingConnection |
|
EmaiImapConnectionClosed |
|
Definition at line 1110 of file EmaiIMAP.h. 01111 {
01112 EmaiImapConnectingToServer = 0,
01113 EmaiImapConnectedToServer,
01114 EmaiImapAuthenticating,
01115 EmaiImapAuthenticated,
01116 EmaiImapCreatingMailbox,
01117 EmaiImapMailboxCreated,
01118 EmaiImapDeletingMailbox,
01119 EmaiImapMailboxDeleted,
01120 EmaiImapSubsribingMailbox,
01121 EmaiImapMailboxSubscribed,
01122 EmaiImapUnSubsribingMailbox,
01123 EmaiImapMailboxUnSubscribed,
01124 EmaiImapRenamingMailbox,
01125 EmaiImapMailboxRenamed,
01126 EmaiImapRetrievingMailboxList,
01127 EmaiImapMailboxListRetrieved,
01128 EmaiImapExaminingMailbox,
01129 EmaiImapMailboxExamined,
01130 EmaiImapRetrievingMailboxStatus,
01131 EmaiImapMailboxStatusRetrieved,
01132 EmaiImapSelectingMailbox,
01133 EmaiImapMailboxSelected,
01134 EmaiImapClosingMailbox,
01135 EmaiImapMailboxClosed,
01136 EmaiImapChecking,
01137 EmaiImapChecked,
01138 EmaiImapAppendingMessage,
01139 EmaiImapMessageAppended,
01140 EmaiImapSearchingMessages,
01141 EmaiImapMessageSearchFinished,
01142 EmaiImapFetchingMessages,
01143 EmaiImapMessagesFetched,
01144 EmaiImapCopyingMessages,
01145 EmaiImapMessagesCopied,
01146 EmaiImapStoringMessagesData,
01147 EmaiImapMessagesDataStored,
01148 EmaiImapExpungingMessages,
01149 EmaiImapMessagesExpunged,
01150 EmaiImapSendingNOOP,
01151 EmaiImapNOOPSent,
01152 EmaiImapClosingConnection,
01153 EmaiImapConnectionClosed
01154 };
Values for selector fields of the EmaiSearchingKey structure.
Comments after constants show which members of the "param" union should be filled for the corresponding selector value.
- See also:
- Emai::ImapSession::Search
ImaiImapSearch
- Enumerator:
-
EmaiSearchAll |
none |
EmaiSearchAnswered |
|
EmaiSearchDeleted |
|
EmaiSearchDraft |
|
EmaiSearchFlagged |
|
EmaiSearchNew |
|
EmaiSearchOld |
|
EmaiSearchRecent |
|
EmaiSearchSeen |
|
EmaiSearchUnanswered |
|
EmaiSearchUndeleted |
|
EmaiSearchUndraft |
|
EmaiSearchUnflagged |
|
EmaiSearchUnseen |
|
EmaiSearchMessageSequence |
messageSequence |
EmaiSearchUid |
|
EmaiSearchBefore |
dateString |
EmaiSearchOn |
|
EmaiSearchSince |
|
EmaiSearchSentBefore |
|
EmaiSearchSentOn |
|
EmaiSearchSentSince |
|
EmaiSearchBcc |
searchingString |
EmaiSearchBody |
|
EmaiSearchCc |
|
EmaiSearchTo |
|
EmaiSearchFrom |
|
EmaiSearchKeyword |
|
EmaiSearchSubject |
|
EmaiSearchText |
|
EmaiSearchUnkeyword |
|
EmaiSearchHeader |
headerField |
EmaiSearchLarger |
number |
EmaiSearchSmaller |
|
EmaiSearchNot |
searchingKey |
EmaiSearchOr |
seachingKeys |
EmaiSearchKeyList |
keyList |
Definition at line 1896 of file EmaiIMAP.h. 01897 {
01899 EmaiSearchAll,
01900 EmaiSearchAnswered,
01901 EmaiSearchDeleted,
01902 EmaiSearchDraft,
01903 EmaiSearchFlagged,
01904 EmaiSearchNew,
01905 EmaiSearchOld,
01906 EmaiSearchRecent,
01907 EmaiSearchSeen,
01908 EmaiSearchUnanswered,
01909 EmaiSearchUndeleted,
01910 EmaiSearchUndraft,
01911 EmaiSearchUnflagged,
01912 EmaiSearchUnseen,
01913
01915 EmaiSearchMessageSequence,
01916 EmaiSearchUid,
01917
01919 EmaiSearchBefore,
01920 EmaiSearchOn,
01921 EmaiSearchSince,
01922 EmaiSearchSentBefore,
01923 EmaiSearchSentOn,
01924 EmaiSearchSentSince,
01925
01927 EmaiSearchBcc,
01928 EmaiSearchBody,
01929 EmaiSearchCc,
01930 EmaiSearchTo,
01931 EmaiSearchFrom,
01932 EmaiSearchKeyword,
01933 EmaiSearchSubject,
01934 EmaiSearchText,
01935 EmaiSearchUnkeyword,
01936
01938 EmaiSearchHeader,
01939
01941 EmaiSearchLarger,
01942 EmaiSearchSmaller,
01943
01945 EmaiSearchNot,
01946
01948 EmaiSearchOr,
01949
01951 EmaiSearchKeyList
01952 };
IMAP server response structures: response data Comments after constants show which member in the data union of EmaiResponse structure is filled for the corresponding responseCode value.
- See also:
- EmaiEnumImapStatusResponseTypes
- Enumerator:
-
EmaiUnrecognizedResponseType |
none |
EmaiStatusResponseType |
status |
EmaiCapabilityResponseType |
capability |
EmaiListResponseType |
list |
EmaiLsubResponseType |
lsub |
EmaiMailboxStatusResponseType |
mailboxStatus |
EmaiSearchResponseType |
search |
EmaiFlagsResponseType |
flags |
EmaiExistsResponseType |
exists |
EmaiRecentResponseType |
recent |
EmaiExpungeResponseType |
expunge |
EmaiFetchResponseType |
fetch |
EmaiContinueRequestResponseType |
continueRequest |
Definition at line 1031 of file EmaiIMAP.h. 01032 {
01033 EmaiUnrecognizedResponseType,
01034 EmaiStatusResponseType,
01035 EmaiCapabilityResponseType,
01036 EmaiListResponseType,
01037 EmaiLsubResponseType,
01038 EmaiMailboxStatusResponseType,
01039 EmaiSearchResponseType,
01040 EmaiFlagsResponseType,
01041 EmaiExistsResponseType,
01042 EmaiRecentResponseType,
01043 EmaiExpungeResponseType,
01044 EmaiFetchResponseType,
01045 EmaiContinueRequestResponseType
01046 };
Status response codes.
Comments after constants show which member in the param union of EmaiResponseText structure is filled for the corresponding code value.
- See also:
- EmaiResponseText
- Enumerator:
-
EmaiNoCode |
none |
EmaiXUserDefinedCode |
text |
EmaiAlertCode |
none |
EmaiBadCharsetCode |
list |
EmaiCapabilityCode |
list |
EmaiParseCode |
none |
EmaiPermanentFlagsCode |
permanentFlags |
EmaiReadOnlyCode |
none |
EmaiReadWriteCode |
none |
EmaiTryCreateCode |
none |
EmaiUIDNextCode |
number |
EmaiUIDValidityCode |
number |
EmaiUnseenCode |
number |
EmaiAppendUIDCode |
uidPlus |
EmaiCopyUIDCode |
uidPlus |
Definition at line 390 of file EmaiIMAP.h. 00391 {
00392
00393 EmaiNoCode,
00394
00395 EmaiXUserDefinedCode,
00397
00398
00399 EmaiAlertCode,
00400 EmaiBadCharsetCode,
00401 EmaiCapabilityCode,
00402 EmaiParseCode,
00403 EmaiPermanentFlagsCode,
00404 EmaiReadOnlyCode,
00405 EmaiReadWriteCode,
00406 EmaiTryCreateCode,
00407 EmaiUIDNextCode,
00408 EmaiUIDValidityCode,
00409 EmaiUnseenCode,
00410 EmaiAppendUIDCode,
00411 EmaiCopyUIDCode
00412 };
These are known flags, which are used as a values of EmaiFlags and EmaiFlagsResponse structures, for example:.
- See also:
- EmaiFlags
EmaiFlagsResponse
EmaiResponse
EmaiStatusResponse
EmaiFetchResponse
EmaiStoreMessageData
EmaiImapAppendMessage
- Enumerator:
-
EmaiAnsweredFlag |
\Answered
Message has been answered |
EmaiFlaggedFlag |
\Flagged
Message is "flagged" for urgent/special attention |
EmaiDeletedFlag |
\Deleted
Message is "deleted" for removal by later EXPUNGE |
EmaiSeenFlag |
\Seen
Message has been read |
EmaiDraftFlag |
\Draft
Message has not completed composition (marked as a draft) |
EmaiAllowKeywordsFlag |
\*
special flag , which indicates that it is possible to create new keywords by attempting to store those flags in the mailbox.
This one can be present only as parameter of EmaiPermanentFlagsCode status code |
EmaiRecentFlag |
\Recent
Message has "recently" arrived in to this mailbox. This session is the first session to be notified about this message; if the session is read-write, subsequent sessions will not see \Recent set for this message. This flag can not be altered by the client.
This flag can appear in FETCH response in FLAGS attributes list |
Definition at line 349 of file EmaiIMAP.h.
Status response types.
- See also:
- EmaiEnumImapServerResponses
EmaiStatusResponse
- Enumerator:
-
EmaiImapOkResponse |
EmaiImapOkResponse |
EmaiImapNoResponse |
EmaiImapNoResponse |
EmaiImapBadResponse |
EmaiImapBadResponse |
EmaiImapPreauthResponse |
EmaiImapPreauthResponse |
EmaiImapByeResponse |
EmaiImapByeResponse |
EmaiTaggedStatusResponse |
EmaiTaggedStatusResponse |
EmaiImapTaggedOkResponse |
EmaiImapTaggedOkResponse |
Definition at line 451 of file EmaiIMAP.h.
Options for EmaiImapSessionCreate function.
- See also:
- EmaiImapSessionCreate
- Enumerator:
-
EmaiImapUseSSLOption |
This session will connect only to secured IMAP servers |
Definition at line 1265 of file EmaiIMAP.h.
Function Documentation
typedef EMAICALLBACKAPI |
( |
void |
, |
|
|
EmaiImapResponseCallback |
| |
|
) |
| | |
Response handling callback declaration for IMAP session.
- Parameters:
-
| inSession | - session object, for which callback was triggered |
| inCommandData | - pointer to the EmaiImapCommandData structure, which contains useful information about current command |
| inResponse | - parsed response received from server |
| inUserData | - user data specified in inResponseUserData parameter of EmaiImapSessionCreate function |
- See also:
- EmaiImapSessionCreate
EmaiImapCommandData
EmaiResponse
The APPEND command appends the new message to the end of the specified destination mailbox. This argument SHOULD be in the format of an [RFC-2822] message. 8-bit characters are permitted in the message.
.
If the destination mailbox does not exist, a server MUST return an error, and MUST NOT automatically create the mailbox. If the mailbox is currently selected, the normal new message actions SHOULD occur.
Refer to RFC3501 (chapter 6.3.11) for more information.
- Parameters:
-
| inSession | - session object |
| inMailbox | - mailbox name |
| inMessageFlags | - zero terminated string with space delimited message flags (for example: "\\Draft \\Flagged") |
| inDateTime | - zero terminated date/time string, which indicates internal message date (for example: " 1-Jan-2006 21:34:27 +0200") |
| inMessage | - message object to be appended |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::AppendMessage
- Returns:
- Return value
Referenced by Emai::ImapSession::AppendMessage().
Authenticates IMAP session.
- Parameters:
-
| inSession | - session object |
| inAccount | - pointer to null-teminated string to specify account name for authentication |
| inPassword | - pointer to null-teminated string to specify password for authentication |
| inOptions | - Authentication method to be used. For example: EmaiIMAPAuthAutomatic, EmaiIMAPAuthLogin, etc |
Refer to RFC3501 (chapter 6.2.2) for more information.
- See also:
- Emai::ImapSession::Authenticate
- Returns:
- Return value
Referenced by Emai::ImapSession::Authenticate().
The CHECK command requests a checkpoint of the currently selected mailbox. A checkpoint refers to any implementation-dependent housekeeping associated with the mailbox (e.g., resolving the server's in-memory state of the mailbox with the state on its disk) that is not normally executed as part of each command. A checkpoint MAY take a non-instantaneous amount of real time to complete. If a server implementation has no such housekeeping considerations, CHECK is equivalent to NOOP.
.
Refer to RFC3501 (chapter 6.4.1) for more information.
- Parameters:
-
| inSession | - session object |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::Check
- Returns:
- Return value
Referenced by Emai::ImapSession::Check().
Permanently removes all messages that have \Deleted flag set from the currently selected mailbox, and returns to the authenticated state from the selected state.
.
Refer to RFC3501 (chapter 6.4.2) for more information.
- Parameters:
-
| inSession | - session object |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::CloseMailbox
- Returns:
- Return value
Referenced by Emai::ImapSession::CloseMailbox().
Connects IMAP session object to the specified mail server.
- Parameters:
-
| inSession | - session object to be connected |
| inMailServer | - pointer to null-teminated string which specifies name or IP address of IMAP server |
| inPort | - port number of IMAP server |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- EmaiEnumImapPorts
Emai::ImapSession::EmaiImapConnect
- Returns:
- Return value
Referenced by Emai::ImapSession::Connect().
Connects IMAP session object to the specified mail server.
- Parameters:
-
| inSession | - session object to be connected |
| inMailServer | - pointer to null-teminated string which specifies name or IP address of IMAP server |
| inPort | - port number of IMAP server |
| inProxyInfo | - proxy server information struct |
| inUserData | - user data specified parameter, use NULL |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- EmaiEnumImapPorts
Emai::ImapSession::EmaiImapConnectEx
- Returns:
- Return value
Referenced by Emai::ImapSession::ConnectEx().
The COPY command copies the specified message(s) to the end of the specified destination mailbox. The flags and internal date of the message(s) SHOULD be preserved, and the Recent flag SHOULD be set, in the copy.
.
If the destination mailbox does not exist, a server SHOULD return an error. It SHOULD NOT automatically create the mailbox.
If the COPY command is unsuccessful for any reason, server implementations MUST restore the destination mailbox to its state before the COPY attempt.
Refer to RFC3501 (chapter 6.4.7) for more information.
- Parameters:
-
| inSession | - session object |
| inMessageSequence | - sequence of the message numbers or message UIDs to be copied |
| inMailbox | - destination mailbox |
| inOptions | - if EmaiImapUIDOption is specified inMessageSequence should specify message UIDs sequense instead of message numbers sequense |
- See also:
- Emai::ImapSession::Copy
- Returns:
- Return value
Referenced by Emai::ImapSession::Copy().
The CREATE command creates a mailbox with the given name. A positive response is returned only if a new mailbox with that name has been created. It is an error to attempt to create INBOX or a mailbox with a name that refers to an extant mailbox. Any error in creation will return an apropriate error code.
.
Refer to RFC3501 (chapter 6.3.3) for more information.
- Parameters:
-
| inSession | - session object |
| inMailbox | - mailbox name |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::CreateMailbox
- Returns:
- Return value
Referenced by Emai::ImapSession::CreateMailbox().
The DELETE command permanently removes the mailbox with the given name. A positive response is returned only if the mailbox has been deleted. It is an error to attempt to delete INBOX or a mailbox name that does not exist.
.
Refer to RFC3501 (chapter 6.3.4) for more information.
- Parameters:
-
| inSession | - session object |
| inMailbox | - mailbox name |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::DeleteMailbox
- Returns:
- Return value
Referenced by Emai::ImapSession::DeleteMailbox().
The EXAMINE command is identical to SELECT and returns the same output; however, the selected mailbox is identified as read-only. No changes to the permanent state of the mailbox, including per-user state, are permitted; in particular, EXAMINE MUST NOT cause messages to lose the \Recent flag.
.
Refer to RFC3501 (chapter 6.3.2) for more information.
- Parameters:
-
| inSession | - session object |
| inMailbox | - mailbox name |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::ExamineMailbox
- Returns:
- Return value
Referenced by Emai::ImapSession::ExamineMailbox().
Permanently removes messages that have \Deleted flag set from the currently selected mailbox.
If inMessageUIDSequence parameter is NULL the function simply sends EXPUNGE command on server. Otherwise it sends UID EXPUNGE command (if it is supported by server) or perform following algorithm: 1) Find all messages marked \Deleted on the server. 2) Find all messages that must not be erased. 3) Temporarily remove \Deleted flag on all messages found in step 2. 4) Expunge the mailbox. 5) Restore \Deleted flag on all messages found when performing step 2. Note: ItÕs possible for another client to mark additional messages as deleted while this sequence is being performed. In this case, these additional messages will be expunged as well.
The algorithm above can be skipped by passing EmaiImapNoCustomExpungeOption as inOption parameter value. In this case no messages will be expunged. This allows caller to use only UID EXPUNGE command if it supported by server, if UID EXPUNGE command is not suppoted the EmaiErrCommandNotSupported error code returned and nothing expunged from mailbox. Caller should implement his own expunge algorithm in this case.
Refer to RFC3501 (chapter 6.4.3) for more information. Refer to RFC4315 (chapter 2.1) for more information Refer to RFC4549 (chapter 4.2.4) for more information
- Parameters:
-
| inSession | - session object |
| inMessageUIDSequence | - sequence of the message UIDs to be expunged |
| inOptions | - EmaiImapNoCustomExpungeOption or EmaiNullOptions |
- See also:
- Emai::ImapSession::Expunge
EmaiEnumImapExpungeOptions
- Returns:
- Return value
Referenced by Emai::ImapSession::Expunge().
The FETCH command retrieves data associated with a message in the mailbox. The data items to be fetched can be either a single atom or a parenthesized list.
.
Refer to RFC3501 (chapter 6.4.5) for more information.
- Parameters:
-
| inSession | - session object |
| inMessageSequence | - sequence of the message numbers or message UIDs to be fetched |
| inMessageData | - message data to be retrieved |
| inOptions | - if EmaiImapUIDOption is specified inMessageSequence should specify message UIDs sequense instead of message numbers sequense |
- See also:
- Emai::ImapSession::Fetch
- Returns:
- Return value
Referenced by Emai::ImapSession::Fetch().
The LIST command returns a subset of names from the complete set of all names available to the client. Zero or more untagged LIST replies are returned, containing the name attributes, hierarchy delimiter, and name; see the description of the LIST reply for more detail.
.
The character "*" is a wildcard, and matches zero or more characters at this position. The character "%" is similar to "*", but it does not match a hierarchy delimiter.
Refer to RFC3501 (chapter 6.3.8) for more information.
- Parameters:
-
| inSession | - session object |
| inReferenceName | - reference name |
| inWildcardedMailboxName | - mailbox name with possible wildcards |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::ListMailboxes
- Returns:
- Return value
Referenced by Emai::ImapSession::ListMailboxes().
The LSUB command returns a subset of names from the set of names that the user has declared as being "active" or "subscribed". Zero or more untagged LSUB replies are returned. The arguments to LSUB are in the same form as those for LIST.
.
Refer to RFC3501 (chapter 6.3.9) for more information.
- Parameters:
-
| inSession | - session object |
| inReferenceName | - reference name |
| inWildcardedMailboxName | - mailbox name with possible wildcards |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::ListSubscribedMailboxes
- Returns:
- Return value
Referenced by Emai::ImapSession::ListSubscribedMailboxes().
The STATUS command requests the status of the indicated mailbox. It does not change the currently selected mailbox, nor does it affect the state of any messages in the queried mailbox (in particular, STATUS MUST NOT cause messages to lose the \Recent flag).
.
The STATUS command provides an alternative to opening a second IMAP4rev1 connection and doing an EXAMINE command on a mailbox to query that mailbox's status without deselecting the current mailbox in the first IMAP4rev1 connection.
Refer to RFC3501 (chapter 6.3.10) for more information.
- Parameters:
-
| inSession | - session object |
| inMailbox | - mailbox name |
| inOptions | - EmaiMessagesNumber, etc |
- See also:
- Emai::ImapSession::MailboxStatus
- Returns:
- Return value
Referenced by Emai::ImapSession::MailboxStatus().
Can be used as a periodic poll for new messages or message status updates during a period of inactivity.
.
Refer to RFC3501 (chapter 6.4.1) for more information
- Parameters:
-
| inSession | - session object |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::Noop
- Returns:
- Return value
Referenced by Emai::ImapSession::Noop().
The RENAME command changes the name of a mailbox. A positive response is returned only if the mailbox has been renamed. It is an error to attempt to rename from a mailbox name that does not exist or to a mailbox name that already exists. Any error in renaming will return an apropriate error code.
.
Renaming INBOX is permitted, and has special behavior. It moves all messages in INBOX to a new mailbox with the given name, leaving INBOX empty. If the server implementation supports inferior hierarchical names of INBOX, these are unaffected by a rename of INBOX.
Refer to RFC3501 (chapter 6.3.5) for more information.
- Parameters:
-
| inSession | - session object |
| inMailbox | - original mailbox to be renamed |
| inNewMailboxName | - new name for the mailbox |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::RenameMailbox
- Returns:
- Return value
Referenced by Emai::ImapSession::RenameMailbox().
The SEARCH command searches the mailbox for messages that match the given searching criteria. Searching criteria consist of one or more search keys.
.
When multiple keys are specified, the result is the intersection (AND function) of all the messages that match those keys. For example, the criteria DELETED FROM "SMITH" SINCE 1-Feb-1994 refers to all deleted messages from Smith that were placed in the mailbox since February 1, 1994. A search key can also be a parenthesized list of one or more search keys (e.g., for use with the OR and NOT keys).
Refer to RFC3501 (chapter 6.4.4) for more information.
- Parameters:
-
| inSession | - session object |
| inSearchingCriteria | - if NULL all messages in mailbox are found |
| inOptions | - specify EmaiImapUIDOption if you want to receive message UIDs instead of message numbers in SEARCH response |
- See also:
- Emai::ImapSession::Search
- Returns:
- Return value
Referenced by Emai::ImapSession::Search().
The SELECT command selects a mailbox so that messages in the mailbox can be accessed. Only one mailbox can be selected at a time in a connection; simultaneous access to multiple mailboxes requires multiple connections. The SELECT command automatically deselects any currently selected mailbox before attempting the new selection. Consequently, if a mailbox is selected and a SELECT command that fails is attempted, no mailbox is selected.
.
Refer to RFC3501 (chapter 6.3.1) for more information.
- Parameters:
-
| inSession | - session object |
| inMailbox | - mailbox name |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::SelectMailbox
- Returns:
- Return value
Referenced by Emai::ImapSession::SelectMailbox().
Checks if number is contained in specified sequence set. The function returns EmaiErrNoErr if number is contained in the sequence set or EmaiErrIncorrectParameter otherwise.
- Parameters:
-
| inSequenceSet | - sequence set object to be examined |
| inNumber | - number to be examined |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::ImapSequenceSet::ContainsNumber().
Adds a number to the specified sequence set.
- Parameters:
-
| inSequenceSet | - sequence set object to be modified |
| inNumber | - a number to be added to sequence set |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::ImapSequenceSet::AddNumber().
Adds a range of numbers to the specified sequence set.
- Parameters:
-
| inSequenceSet | - sequence set object to be modified |
| inMinNumber | - a lower bound of range to be added to sequence set |
| inMaxNumber | - a upper bound of range to be added to sequence set |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::ImapSequenceSet::AddRange().
Adds all numbers from a sequence set object to another sequence set.
- Parameters:
-
| inSequenceSet | - sequence set object to be modified |
| inSequenceSetToAdd | - a sequence set to be added to sequence set |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::ImapSequenceSet::AddSequenceSet().
Retrieves first and/or last numbers in sequence set. EmaiErrIncorrectParameter error code will be returned by the function if outFirstNumber and outLastNumber are both NULL. EmaiErrIncorrectParameter is also returned is sequence set is empty.
- Parameters:
-
| inSequenceSet | - sequence set object to be examined |
| outFirstNumber | - if non-NULL on exit contains first number of the sequence set |
| outLastNumber | - if non-NULL on exit contains last number of the sequence set |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::ImapSequenceSet::GetBounds(), Emai::ImapSequenceSet::GetFirstNumber(), and Emai::ImapSequenceSet::GetLastNumber().
Retrieves count of numbers in sequence set.
- Parameters:
-
| inSequenceSet | - sequence set object to be examined |
| outCount | - on exit contains count of numbers in the sequence set |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::ImapSequenceSet::GetCount().
Retrieves previous or next numbers in sequence set. The function is designed for using in conjunction with EmaiImapSequenceSetGetBounds for iterating numbers stored in sequence set object. Note, the function do not require the inNumber parameter to be contained in sequence set, EmaiImapSequenceSetGetNextNumber will return nearest number from the sequense set.
Forward enumeration:
EmaiUint32 number; EmaiError error = EmaiImapSequenceSetGetBounds(sequenceSet, &number, NULL, EmaiNullOptions); while (error == EmaiErrNoErr) { //perform operations with number .... //retrieve next number from sequence set error = EmaiImapSequenceSetGetNextNumber(sequenceSet, number, &number, EmaiImapForward); }
Backward enumeration:
EmaiUint32 number; EmaiError error = EmaiImapSequenceSetGetBounds(sequenceSet, NULL, &number, EmaiNullOptions); while (error == EmaiErrNoErr) { //perform operations with number .... //retrieve next number from sequence set error = EmaiImapSequenceSetGetNextNumber(sequenceSet, number, &number, EmaiImapBackward); }
- Parameters:
-
| inSequenceSet | - sequence set object to be examined |
| inNumber | - current number of the sequence set |
| outLastNumber | - on exit contains next or previous (depending on inOptions value) number of the sequence set |
| inOptions | - EmaiImapForward or EmaiImapBackward (See EmaiEnumImapSequenceSetGetNextNumberOptions) |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::ImapSequenceSet::GetNextNumberBackward(), and Emai::ImapSequenceSet::GetNextNumberForward().
Remove a number from the specified sequence set.
- Parameters:
-
| inSequenceSet | - sequence set object to be modified |
| inNumber | - a number to be removed from sequence set |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::ImapSequenceSet::RemoveNumber().
Remove a range of numbers from the specified sequence set.
- Parameters:
-
| inSequenceSet | - sequence set object to be modified |
| inMinNumber | - a lower bound of range to be removed from sequence set |
| inMaxNumber | - a upper bound of range to be removed from sequence set |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::ImapSequenceSet::RemoveRange().
Remove all numbers contained in a sequence set object from another sequence set.
- Parameters:
-
| inSequenceSet | - sequence set object to be modified |
| inSequenceSetToRemove | - a sequence set to be removed from sequence set |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::ImapSequenceSet::RemoveSequenceSet().
EmaiImapSessionCreate |
( |
EmaiImapSession * |
outSession, |
|
|
EmaiImapResponseCallback |
inResponseCallback, |
|
|
void * |
inResponseUserData, |
|
|
EmaiImapStatusCallback |
inStatusCallback, |
|
|
void * |
inStatusUserData, |
|
|
EmaiUint32 |
inTimeout, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
Creates IMAP session object.
- Parameters:
-
| outSession | - on exit contains session object |
| inResponseCallback | - response callback |
| inResponseUserData | - user data which is passed in response callback as inUserData parameter |
| inStatusCallback | - status callback |
| inStatusUserData | - user data which is passed in status callback as inUserData parameter |
| inTimeout | - timeout value in seconds |
| inOptions | - use EmaiUseSSLOption to create secured SSL session or EmaiNullOptions otherwise |
- Returns:
- Return value
Referenced by Emai::ImapSession::ImapSession().
The STORE command alters data associated with a message in the mailbox.
.
Refer to RFC3501 (chapter 6.4.6) for more information.
- Parameters:
-
| inSession | - session object |
| inMessageSequence | - sequence of the message numbers or message UIDs to be stored |
| inMessageData | - message data to be set |
| inOptions | - if EmaiImapUIDOption is specified inMessageSequence should specify message UIDs sequense instead of message numbers sequense |
- See also:
- Emai::ImapSession::Store
- Returns:
- Return value
Referenced by Emai::ImapSession::Store().
The SUBSCRIBE command adds the specified mailbox name to the server's set of "active" or "subscribed" mailboxes as returned by the LSUB command. This command returns a positive response only if the subscription is successful.
.
Refer to RFC3501 (chapter 6.3.6) for more information.
- Parameters:
-
| inSession | - session object |
| inMailbox | - mailbox name |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::SubscribeMailbox
- Returns:
- Return value
Referenced by Emai::ImapSession::SubscribeMailbox().
The UNSUBSCRIBE command removes the specified mailbox name from the server's set of "active" or "subscribed" mailboxes as returned by the LSUB command. This command returns a positive response only if the unsubscription is successful.
.
Refer to RFC3501 (chapter 6.3.7) for more information.
- Parameters:
-
| inSession | - session object |
| inMailbox | - mailbox name |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- Emai::ImapSession::UnsubscribeMailbox
- Returns:
- Return value
Referenced by Emai::ImapSession::UnsubscribeMailbox().
|