EmaiPOP3.h File ReferencePOP3 functionality. More...
#include <EmaiTypes.h>
#include <EmaiErrors.h>
#include <EmaiMessage.h>
#include <EmaiProxy.h>
Go to the source code of this file.
|
Classes |
struct | EmaiPop3CallbackData |
| EmaiPop3CallbackData structure. More...
|
struct | EmaiMessageInfo |
| Message info stored at the message info list. More...
|
Enumerations |
enum | EmaiEnumPop3Selector { EmaiPop3SelectorNormal = 0,
EmaiPop3SelectorReceiving,
EmaiPop3SelectorServerError
} |
| Constants for selector member of the EmaiPop3CallbackData structure. More...
|
enum | EmaiEnumPop3OperationCode {
EmaiPop3ConnectingToServer = 0,
EmaiPop3ConnectedToServer,
EmaiPop3Authenticating,
EmaiPop3Authenticated,
EmaiPop3GettingMessageList,
EmaiPop3GotMessageList,
EmaiPop3GettingMessageUIDLs,
EmaiPop3GotMessageUIDLs,
EmaiPop3RetrievingMessage,
EmaiPop3MessageRetrieved,
EmaiPop3DeletingMessage,
EmaiPop3MessageDeleted,
EmaiPop3SendingNOOP,
EmaiPop3NOOPSent,
EmaiPop3ClosingConnection,
EmaiPop3ConnectionClosed
} |
| Constants for operation codes for pop3 sessions. More...
|
enum | EmaiEnumPop3ReplyCode {
EmaiPop3NotSupported = 0,
EmaiPop3NoCode,
EmaiPop3Unknown,
EmaiPop3LoginDelay,
EmaiPop3InUse,
EmaiPop3System,
EmaiPop3Auth
} |
| Constants for reply codes for pop3 sessions. More...
|
enum | EmaiEnumPop3SSL { EmaiPop3UseSSLOption = 0x01
} |
| Constants, used for session establishing function. More...
|
enum | EmaiEnumPop3Ports { EmaiDefaultPop3Port = 110,
EmaiDefaultPop3SSLPort = 995
} |
| Constants for default POP3 ports. More...
|
enum | EmaiEnumPop3AuthSelector {
EmaiPOP3AuthAutomatic,
EmaiPOP3AuthLoginCommand,
EmaiPOP3AuthApop,
EmaiPOP3AuthLogin,
EmaiPOP3AuthPlain,
EmaiPOP3AuthCramMD5,
EmaiPOP3AuthNTLM
} |
| Constants, Authentication modes for EmaiPop3Authenticate function. More...
|
enum | EmaiEnumPop3RetrieveAttribute { EmaiRetrieveRFC822Header = 1
} |
| Retrieve type for EmaiPop3RetrieveMessage function. More...
|
enum | EmaiEnumPop3CreateMessageInfoFlags { EmaiCreateFileIfNotExists = 1
} |
| Constants for EmaiPop3CreateMessageInfoList functions. More...
|
enum | EmaiEnumPop3MessageInfoListGetCountFlags { EmaiMessagesForDownload = 0,
EmaiMessagesForDeletion,
EmaiMessagesOnServer
} |
| Constants for EmaiPop3MessageInfoListEvaluateSubList, EmaiPop3MessageInfoListGetCount and EmaiPop3MessageInfoListGetInfo functions. More...
|
enum | EmaiEnumPop3MessageInfoMarkMessageReceivedFlags { EmaiMessageIndexInList = 0,
EmaiMessageIndexOnServer
} |
| Constants for the EmaiPop3MessageInfoMarkMessageReceived function. More...
|
Functions |
| EmaiPop3SessionCreate (EmaiPop3Session *outSession, EmaiPop3StatusCallback inStatusCallback, void *inUserData, EmaiUint32 inTimeout, EmaiOptions inOptions) |
| Creates POP3 session object.
|
| EmaiPop3Connect (EmaiPop3Session inSession, EmaiConstUniCharPtr inMailServer, short inPort, EmaiOptions inOptions) |
| Connects POP3 session object to the specified mail server.
|
| EmaiPop3ConnectEx (EmaiPop3Session inSession, EmaiConstUniCharPtr inMailServer, short inPort, const EmaiProxyInfo *inProxyInfo, void *inUserData, EmaiOptions inOptions) |
| Connects POP3 session object to the specified mail server.
|
| EmaiPop3Disconnect (EmaiPop3Session inSession, EmaiOptions inOptions) |
| Disconnects POP3 session object from mail server.
|
| EmaiPop3Authenticate (EmaiPop3Session inSession, EmaiConstUniCharPtr inAccount, EmaiConstUniCharPtr inPassword, EmaiOptions inOptions) |
| Authenticates the POP3 session.
|
| EmaiPop3RetrieveMessageList (EmaiPop3Session inSession, EmaiPop3MessageInfoList inMessageInfoList, EmaiOptions inOptions) |
| Retrieves the list of messages, stored on the server. This function internally calls EmaiPop3MessageInfoListEvaluateSubList with EmaiMessagesForDownload option, so after calling EmaiPop3RetrieveMessageList you can skip evaluating of download message list and start message downloading immediately.
|
| EmaiPop3RetrieveMessage (EmaiPop3Session inSession, EmaiMessage *outMessage, EmaiUint32 inMessageNumber, EmaiOptions inOptions) |
| Retrieves the message from the server.
|
| EmaiPop3DeleteMessage (EmaiPop3Session inSession, EmaiUint32 inMessageNumber, EmaiOptions inOptions) |
| Marks message on server as "deleted".
|
| EmaiPop3Reset (EmaiPop3Session inSession, EmaiOptions inOptions) |
| Unmarks all messages as "deleted" on the server.
|
| EmaiPop3Cancel (EmaiPop3Session inSession, EmaiOptions inOptions) |
| Marks POP3 session to be cancelled ASAP.
|
| EmaiPop3Noop (EmaiPop3Session inSession, EmaiOptions inOptions) |
| Sens NOOP command to the POP3 server. Used to avoid timout disconnection, during inactivity period.
|
| EmaiPop3MessageInfoListCreateFromFile (EmaiPop3MessageInfoList *outMessageInfoList, EmaiConstUniCharPtr inFullFilePath, EmaiOptions inOptions) |
| Creates message info list from the specified file.
|
| EmaiPop3MessageInfoListCreateFromData (EmaiPop3MessageInfoList *outMessageInfoList, const void *inMessageListData, EmaiUint32 inMessageListDataSize, EmaiOptions inOptions) |
| Creates message info list from the input data.
|
| EmaiPop3MessageInfoListGetHistoryData (EmaiPop3MessageInfoList inMessageInfoList, const void **outData, EmaiUint32 &outDataSize, EmaiOptions inOptions) |
| Retrieves message info list data.
|
| EmaiPop3MessageInfoListResetHistory (EmaiPop3MessageInfoList inMessageInfoList, EmaiConstUniCharPtr inAccount, EmaiConstUniCharPtr inServer, EmaiOptions inOptions) |
| Reset message info list.
|
| EmaiPop3MessageInfoListEvaluateSubList (EmaiPop3MessageInfoList inMessageInfoList, EmaiUint32 inDays, EmaiOptions inOptions) |
| Calculates the sublist of the messages, depending of the inOptions value. For EmaiMessagesForDownload value this function evaluates message list which wasn't downloaded from the server yet. For EmaiMessagesForDeletion value this function evaluates outdated messages which were received more that 'inDays' days ago.
|
| EmaiPop3MessageInfoListGetCount (EmaiPop3MessageInfoList inMessageInfoList, EmaiUint32 *outCount, EmaiOptions inOptions) |
| Returns the number of information records, stored at the message info list.
|
| EmaiPop3MessageInfoListGetInfo (EmaiPop3MessageInfoList inMessageInfoList, EmaiUint32 inMessageIndex, EmaiMessageInfo *outInfo, EmaiOptions inOptions) |
| Retrives information record stored at the particular index of the message info list.
|
| EmaiPop3MessageInfoMarkMessageReceived (EmaiPop3MessageInfoList inMessageInfoList, EmaiUint32 inMessageIndex, EmaiOptions inOptions) |
| Marks the message at the specified index as "received", and saves it's info in the message history. This function will fail, if current sublist is not EmaiMessagesForDownload.
|
Detailed Description
POP3 functionality.
- Version:
- Mailit for C/C++ 1.0
- Author:
- (C) 2008-2010 Dacons LLP.
Definition in file EmaiPOP3.h.
Enumeration Type Documentation
Constants, Authentication modes for EmaiPop3Authenticate function.
- See also:
- EmaiPop3Authenticate
Emai::Pop3Session::Authenticate
- Enumerator:
-
EmaiPOP3AuthAutomatic |
Automatically tries all available mechanisms USER/PASS authentification |
EmaiPOP3AuthLoginCommand |
APOP authentification |
EmaiPOP3AuthApop |
LOGIN authentification |
EmaiPOP3AuthLogin |
PLAIN authentification |
EmaiPOP3AuthPlain |
CRAM-MD5 authentification |
EmaiPOP3AuthCramMD5 |
NTLM authentification |
EmaiPOP3AuthNTLM |
|
Definition at line 254 of file EmaiPOP3.h.
Constants for operation codes for pop3 sessions.
- See also:
- EmaiPop3CallbackData
- Enumerator:
-
EmaiPop3ConnectingToServer |
|
EmaiPop3ConnectedToServer |
|
EmaiPop3Authenticating |
|
EmaiPop3Authenticated |
|
EmaiPop3GettingMessageList |
|
EmaiPop3GotMessageList |
|
EmaiPop3GettingMessageUIDLs |
|
EmaiPop3GotMessageUIDLs |
|
EmaiPop3RetrievingMessage |
|
EmaiPop3MessageRetrieved |
|
EmaiPop3DeletingMessage |
|
EmaiPop3MessageDeleted |
|
EmaiPop3SendingNOOP |
|
EmaiPop3NOOPSent |
|
EmaiPop3ClosingConnection |
|
EmaiPop3ConnectionClosed |
|
Definition at line 55 of file EmaiPOP3.h. 00056 {
00057 EmaiPop3ConnectingToServer = 0,
00058 EmaiPop3ConnectedToServer,
00059 EmaiPop3Authenticating,
00060 EmaiPop3Authenticated,
00061 EmaiPop3GettingMessageList,
00062 EmaiPop3GotMessageList,
00063 EmaiPop3GettingMessageUIDLs,
00064 EmaiPop3GotMessageUIDLs,
00065 EmaiPop3RetrievingMessage,
00066 EmaiPop3MessageRetrieved,
00067 EmaiPop3DeletingMessage,
00068 EmaiPop3MessageDeleted,
00069 EmaiPop3SendingNOOP,
00070 EmaiPop3NOOPSent,
00071 EmaiPop3ClosingConnection,
00072 EmaiPop3ConnectionClosed
00073 };
Constants for reply codes for pop3 sessions.
- See also:
- EmaiPop3CallbackData
- Enumerator:
-
EmaiPop3NotSupported |
Reply codes not supported by server |
EmaiPop3NoCode |
Reply code is not specified by server |
EmaiPop3Unknown |
Reply code is not recognized by library |
EmaiPop3LoginDelay |
The login delay period is not expired yet |
EmaiPop3InUse |
Maildrop is currently in use (probably by another POP3 client) |
EmaiPop3System |
Failure due to system error |
EmaiPop3Auth |
Authentication failed for some reason (incorrect password or unknown user name) |
Definition at line 80 of file EmaiPOP3.h.
Function Documentation
Marks POP3 session to be cancelled ASAP.
- Parameters:
-
| inSession | - session object, to be used |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::Pop3Session::Cancel().
Connects POP3 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 POP3 server |
| inPort | - port number of POP3 server |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- EmaiEnumPop3Ports
Emai::Pop3Session::Connect
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::Pop3Session::Connect().
Connects POP3 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 POP3 server |
| inPort | - port number of POP3 server |
| inProxyInfo | - proxy server information struct |
| inUserData | - user data specified parameter, use NULL |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- EmaiEnumPop3Ports
Emai::Pop3Session::ConnectEx
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::Pop3Session::ConnectEx().
EmaiPop3MessageInfoListCreateFromData |
( |
EmaiPop3MessageInfoList * |
outMessageInfoList, |
|
|
const void * |
inMessageListData, |
|
|
EmaiUint32 |
inMessageListDataSize, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
Creates message info list from the input data.
- Parameters:
-
| outMessageInfoList | - on exit contains message info list object |
| inMessageListData | - pointer to the message data, where info list is stored |
| inMessageListDataSize | - size of the inMessageListData |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::MessageInfoList::MessageInfoList().
Creates message info list from the specified file.
- Parameters:
-
| outMessageInfoList | - on exit contains message info list object |
| inFullFilePath | - full path to the file where info list is stored, relative file paths are not accepted by the function |
| inOptions | - use EmaiCreateFileIfNotExists if you want to create file, use EmaiNullOptions otherwise |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::MessageInfoList::MessageInfoList().
EmaiPop3MessageInfoListEvaluateSubList |
( |
EmaiPop3MessageInfoList |
inMessageInfoList, |
|
|
EmaiUint32 |
inDays, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
Calculates the sublist of the messages, depending of the inOptions value. For EmaiMessagesForDownload value this function evaluates message list which wasn't downloaded from the server yet. For EmaiMessagesForDeletion value this function evaluates outdated messages which were received more that 'inDays' days ago.
- Parameters:
-
| inMessageInfoList | - message info list object to be examined |
| inDays | - number of days |
| inOptions | - EmaiMessagesForDownload or EmaiMessagesForDeletion or EmaiMessagesOnServer (See EmaiEnumPop3MessageInfoListGetCountFlags) |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::MessageInfoList::EvaluateSublist().
EmaiPop3MessageInfoListGetCount |
( |
EmaiPop3MessageInfoList |
inMessageInfoList, |
|
|
EmaiUint32 * |
outCount, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
Returns the number of information records, stored at the message info list.
- Parameters:
-
| inMessageInfoList | - message info list object to be examined |
| outCount | - on exit contains the number of information records, stored at the message info list |
| inOptions | - EmaiMessagesForDownload or EmaiMessagesForDeletion or EmaiMessagesOnServer (See EmaiEnumPop3MessageInfoListGetCountFlags) |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::MessageInfoList::GetCount().
EmaiPop3MessageInfoListGetHistoryData |
( |
EmaiPop3MessageInfoList |
inMessageInfoList, |
|
|
const void ** |
outData, |
|
|
EmaiUint32 & |
outDataSize, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
Retrieves message info list data.
- Parameters:
-
| intMessageInfoList | - message info list object to be examined |
| outData | - on exit will be filled with history data |
| outDataSize | - on exit will be filled with size of history data |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::MessageInfoList::GetMessageInfoListData().
EmaiPop3MessageInfoListGetInfo |
( |
EmaiPop3MessageInfoList |
inMessageInfoList, |
|
|
EmaiUint32 |
inMessageIndex, |
|
|
EmaiMessageInfo * |
outInfo, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
Reset message info list.
- Parameters:
-
| intMessageInfoList | - message info list object to be examined |
| inAccount | - reset account string |
| inServer | - reset server string |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::MessageInfoList::ResetInfoList().
EmaiPop3MessageInfoMarkMessageReceived |
( |
EmaiPop3MessageInfoList |
inMessageInfoList, |
|
|
EmaiUint32 |
inMessageIndex, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
Marks the message at the specified index as "received", and saves it's info in the message history. This function will fail, if current sublist is not EmaiMessagesForDownload.
- Parameters:
-
| inMessageInfoList | - message info list object to be modified |
| inMessageIndex | - index of the message, actual interpretation of this parameter depends of the inOptions value, for more information see options value description |
| inOptions | - EmaiMessageIndexInList or EmaiMessageIndexOnServer |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::MessageInfoList::MarkMessageReceived().
Retrieves the list of messages, stored on the server. This function internally calls EmaiPop3MessageInfoListEvaluateSubList with EmaiMessagesForDownload option, so after calling EmaiPop3RetrieveMessageList you can skip evaluating of download message list and start message downloading immediately.
- Parameters:
-
| inSession | - session object, to be used |
| inMessageInfoList | - message list created using EmaiPop3MessageInfoListCreateFromFile or EmaiPop3MessageInfoListCreateFromData functions; initially this list contains messages which were received in previous pop3 sessions. It is up to user to pass correct list which contains message history for the e-mail account currenly user is working with. |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- EmaiPop3MessageInfoListCreateFromFile
EmaiPop3MessageInfoListCreateFromData
Emai::Pop3Session::RetrieveMessageList
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::Pop3Session::RetrieveMessageList().
EmaiPop3SessionCreate |
( |
EmaiPop3Session * |
outSession, |
|
|
EmaiPop3StatusCallback |
inStatusCallback, |
|
|
void * |
inUserData, |
|
|
EmaiUint32 |
inTimeout, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
Creates POP3 session object.
- Parameters:
-
| outSession | - on exit contains session object |
| inStatusCallback | - status callback |
| inUserData | - 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:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::Pop3Session::Pop3Session().
|