EmaiSMTP.h File ReferenceSMTP functionality. More...
#include <EmaiTypes.h>
#include <EmaiErrors.h>
#include <EmaiMessage.h>
#include <EmaiProxy.h>
Go to the source code of this file.
|
Classes |
| struct | EmaiSmtpCallbackData |
| | EmaiSmtpCallbackData structure. More...
|
Enumerations |
| enum | EmaiEnumSmtpSelector { EmaiSmtpSelectorNormal = 0,
EmaiSmtpSelectorSending,
EmaiSmtpSelectorServerError
} |
| | Constants for selector member of the EmaiSmtpCallbackData structure/class. More...
|
| enum | EmaiEnumSmtpOperationCode {
EmaiSmtpConnectingToServer = 0,
EmaiSmtpConnectedToServer,
EmaiSmtpAuthenticating,
EmaiSmtpAuthenticated,
EmaiSmtpIntroducingSender,
EmaiSmtpSenderIntroduced,
EmaiSmtpSendingRecipients,
EmaiSmtpRecipientsSent,
EmaiSmtpSendingMessageData,
EmaiSmtpMessageDataSent,
EmaiSmtpSendingNOOP,
EmaiSmtpNOOPSent,
EmaiSmtpClosingConnection,
EmaiSmtpConnectionClosed
} |
| | Constants for operation codes for smtp sessions. More...
|
| enum | EmaiEnumSmtpSSL { EmaiSmtpUseSSLOption = 0x01
} |
| | Constants, used for session establishing function. More...
|
| enum | EmaiEnumSmtpPorts { EmaiDefaultSmtpPort = 25,
EmaiDefaultSmtpSSLPort = 465
} |
| | Constants for default SMTP port. More...
|
| enum | EmaiEnumSmtpAuthSelector {
EmaiSMTPAuthAutomatic,
EmaiSMTPAuthLogin,
EmaiSMTPAuthPlain,
EmaiSMTPAuthCramMD5,
EmaiSMTPAuthNTLM
} |
| | Constants for Authentication modes of the EmaiSmtpAuthenticate function. More...
|
Functions |
| | EmaiSmtpSessionCreate (EmaiSmtpSession *outSession, EmaiSmtpStatusCallback inStatusCallback, void *inUserData, EmaiUint32 inTimeout, EmaiOptions inOptions) |
| | Creates SMTP session object.
|
| | EmaiSmtpConnect (EmaiSmtpSession inSession, EmaiConstUniCharPtr inMailServer, short inPort, EmaiOptions inOptions) |
| | Connects SMTP session object to the specified mail server.
|
| | EmaiSmtpConnectEx (EmaiSmtpSession inSession, EmaiConstUniCharPtr inMailServer, short inPort, const EmaiProxyInfo *inProxyInfo, void *inUserData, EmaiOptions inOptions) |
| | Connects SMTP session object to the specified mail server.
|
| | EmaiSmtpDisconnect (EmaiSmtpSession inSession, EmaiOptions inOptions) |
| | Disconnects SMTP session object from the mail server.
|
| | EmaiSmtpAuthenticate (EmaiSmtpSession inSession, EmaiConstUniCharPtr inAccount, EmaiConstUniCharPtr inPassword, EmaiOptions inOptions) |
| | Authenticates the SMTP session.
|
| | EmaiSmtpSendMessage (EmaiSmtpSession inSession, EmaiMessage inMessage, EmaiOptions inOptions) |
| | Sends the message.
|
| | EmaiSmtpSendMessageEx (EmaiSmtpSession inSession, EmaiMessage inMessage, EmaiStringList *outFailedRecipients, EmaiOptions inOptions) |
| | Sends the message.
|
| | EmaiSmtpCancel (EmaiSmtpSession inSession, EmaiOptions inOptions) |
| | Marks the SMTP session to be cancelled ASAP.
|
| | EmaiSmtpNoop (EmaiSmtpSession inSession, EmaiOptions inOptions) |
| | Sends NOOP command to SMTP server, and reads server reply. Used to avoid timout disconnection, during inactivity period.
|
| | EmaiSmtpSendCommand (EmaiSmtpSession inSession, const char *inCommand, EmaiUint32 inExpectedReplyCode, EmaiOptions inOptions) |
| | Sends a command to the SMTP server, reads server reply and compares server reply code with the expected one (passed via inExpectedReplyCode parameter).
Actual server answer can be accessed using EmaiSmtpGetLastServerResponse function.
|
| | EmaiSmtpGetLastServerResponse (EmaiSmtpSession inSession, char *outResponse, EmaiUint32 *ioResponseSize, EmaiUint32 *outReplyCode, EmaiOptions inOptions) |
| | Retrieves the last SMTP server response.
|
Detailed Description
SMTP functionality.
- Version:
- Mailit for C/C++ 1.0
- Author:
- (C) 2008-2010 Dacons LLP.
Definition in file EmaiSMTP.h.
Enumeration Type Documentation
Constants for Authentication modes of the EmaiSmtpAuthenticate function.
- See also:
- EmaiSmtpAuthenticate()
Emai::SmtpSession::Authenticate()
- Enumerator:
-
| EmaiSMTPAuthAutomatic |
Automatically tries all available mechanisms LOGIN authentification |
| EmaiSMTPAuthLogin |
PLAIN authentification |
| EmaiSMTPAuthPlain |
Cram-MD5 authentification |
| EmaiSMTPAuthCramMD5 |
NTLM authentification |
| EmaiSMTPAuthNTLM |
|
Definition at line 233 of file EmaiSMTP.h.
Constants for operation codes for smtp sessions.
- See also:
- EmaiSmtpCallbackData
- Enumerator:
-
| EmaiSmtpConnectingToServer |
|
| EmaiSmtpConnectedToServer |
|
| EmaiSmtpAuthenticating |
|
| EmaiSmtpAuthenticated |
|
| EmaiSmtpIntroducingSender |
|
| EmaiSmtpSenderIntroduced |
|
| EmaiSmtpSendingRecipients |
|
| EmaiSmtpRecipientsSent |
|
| EmaiSmtpSendingMessageData |
|
| EmaiSmtpMessageDataSent |
|
| EmaiSmtpSendingNOOP |
|
| EmaiSmtpNOOPSent |
|
| EmaiSmtpClosingConnection |
|
| EmaiSmtpConnectionClosed |
|
Definition at line 54 of file EmaiSMTP.h. 00055 {
00056 EmaiSmtpConnectingToServer = 0,
00057 EmaiSmtpConnectedToServer,
00058 EmaiSmtpAuthenticating,
00059 EmaiSmtpAuthenticated,
00060 EmaiSmtpIntroducingSender,
00061 EmaiSmtpSenderIntroduced,
00062 EmaiSmtpSendingRecipients,
00063 EmaiSmtpRecipientsSent,
00064 EmaiSmtpSendingMessageData,
00065 EmaiSmtpMessageDataSent,
00066 EmaiSmtpSendingNOOP,
00067 EmaiSmtpNOOPSent,
00068 EmaiSmtpClosingConnection,
00069 EmaiSmtpConnectionClosed
00070 };
Function Documentation
| EmaiSmtpCancel |
( |
EmaiSmtpSession |
inSession, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
Connects SMTP session object to the specified mail server.
- Parameters:
-
| inSession | - session object to be connected |
| inMailServer | - pointer to null-teminated string, which contains the name or IP address of the SMTP server |
| inPort | - port number of the SMTP server |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- EmaiEnumSmtpPorts
Emai::SmtpSession::Connect
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::SmtpSession::Connect().
Connects SMTP session object to the specified mail server.
- Parameters:
-
| inSession | - session object to be connected |
| inMailServer | - pointer to null-teminated string, which contains the name or IP address of the SMTP server |
| inPort | - port number of the SMTP server |
| inProxyInfo | - proxy server information struct |
| inUserData | - user data specified parameter, use NULL |
| inOptions | - not used in current version, use EmaiNullOptions |
- See also:
- EmaiEnumSmtpPorts
Emai::SmtpSession::ConnectEx
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::SmtpSession::ConnectEx().
| EmaiSmtpDisconnect |
( |
EmaiSmtpSession |
inSession, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
| EmaiSmtpGetLastServerResponse |
( |
EmaiSmtpSession |
inSession, |
|
|
char * |
outResponse, |
|
|
EmaiUint32 * |
ioResponseSize, |
|
|
EmaiUint32 * |
outReplyCode, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
Retrieves the last SMTP server response.
- Parameters:
-
| inSession | - session object to be used |
| outResponse | - on exit contains zero terminated last server response |
| ioResponseSize | - specifies outResponse buffer size, on exit filled with response length in bytes |
| outReplyCode | - on exit contains reply code extracted from last server response string, specfy NULL if you don't need this infomation |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Result code (See EmaiEnumResultCodes)
| EmaiSmtpNoop |
( |
EmaiSmtpSession |
inSession, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
| EmaiSmtpSendCommand |
( |
EmaiSmtpSession |
inSession, |
|
|
const char * |
inCommand, |
|
|
EmaiUint32 |
inExpectedReplyCode, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
Sends a command to the SMTP server, reads server reply and compares server reply code with the expected one (passed via inExpectedReplyCode parameter).
Actual server answer can be accessed using EmaiSmtpGetLastServerResponse function.
- Parameters:
-
| inSession | - session object, to be used for sending |
| inCommand | - command to be sent to SMTP server |
| inExpectedReplyCode | - expected server reply code, which means that command was accepted by server succesfully |
| inOptions | - not used in current version, use EmaiNullOptions |
- Returns:
- Return value:
| EmaiSmtpSessionCreate |
( |
EmaiSmtpSession * |
outSession, |
|
|
EmaiSmtpStatusCallback |
inStatusCallback, |
|
|
void * |
inUserData, |
|
|
EmaiUint32 |
inTimeout, |
|
|
EmaiOptions |
inOptions | |
|
) |
| | |
Creates SMTP session object.
- Parameters:
-
| outSession | - on exit contains session object, to be used with other function calls |
| inStatusCallback | - pointer to the callback function (used for status report) |
| inUserData | - TODO |
| inTimeout | - timeout in seconds |
| inOptions | - use EmaiUseSSLOption option to create secured SSL session, or EmaiNullOptions otherwise |
- Returns:
- Result code (See EmaiEnumResultCodes)
Referenced by Emai::SmtpSession::SmtpSession(), and Emai::SmtpSessionInternal::SmtpSessionInternal().
|