Dacons LLP Mailit for C/C++ Version 1.0.8

Emai::SmtpSession Class Reference

Wrapper class for EmaiSmtpSession. More...

#include <EmaiSMTP.hpp>

Inheritance diagram for Emai::SmtpSession:

Emai::Object< EmaiSmtpSession > List of all members.

Public Member Functions

 SmtpSession (SmtpStatusCallback &inStatusCallback, EmaiUint32 inTimeout, EmaiOptions inOptions=EmaiNullOptions)
 SmtpSession (EmaiSmtpStatusCallback inStatusCallback, void *inUserData, EmaiUint32 inTimeout, EmaiOptions inOptions=EmaiNullOptions)
 SmtpSession (const SmtpSession &inCopy)
 SmtpSession (EmaiSmtpSession inSession, bool inAddRef)
 ~SmtpSession ()
void Connect (EmaiConstUniCharPtr inMailServer, short inPort=EmaiDefaultSmtpPort, EmaiOptions inOptions=EmaiNullOptions)
 Establishes connection to the server.
void ConnectEx (EmaiConstUniCharPtr inMailServer, short inPort=EmaiDefaultSmtpPort, const EmaiProxyInfo *inProxyInfo=NULL, void *inUserData=NULL, EmaiOptions inOptions=EmaiNullOptions)
 Establishes connection to the server.
void Disconnect (EmaiOptions inOptions=EmaiNullOptions)
 Disconnects the session from the server.
void Authenticate (EmaiConstUniCharPtr inAccount, EmaiConstUniCharPtr inPassword, EmaiOptions inOptions=EmaiSMTPAuthAutomatic)
 Authenticates the session at the server.
void SendMessage (const Message &inMessage, EmaiOptions inOptions=EmaiNullOptions)
 Sends the message.
void SendMessageEx (const Message &inMessage, StringList &outFailedRecipients, EmaiOptions inOptions=EmaiNullOptions)
 Sends the message.
void Cancel (EmaiOptions inOptions=EmaiNullOptions)
 Marks the SMTP session to be cancelled ASAP.
void Noop (EmaiOptions inOptions=EmaiNullOptions)
 Sens NOOP command to the SMTP server. Used to avoid timout disconnection, during inactivity period.

Protected Types

typedef Object< EmaiSmtpSession > Parent

Protected Member Functions

 SmtpSession ()
 no implementation

Detailed Description

Wrapper class for EmaiSmtpSession.

Definition at line 90 of file EmaiSMTP.hpp.


Member Function Documentation

void Emai::SmtpSession::Connect ( EmaiConstUniCharPtr  inMailServer,
short  inPort = EmaiDefaultSmtpPort,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

Establishes connection to the server.

Parameters:
EmaiConstCharPtr inMailServer - pointer to the null-teminated string, which contains the name or IP address of the SMTP server
short inPort - port number of the SMTP server
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiEnumSmtpDefaultPort

EmaiSmtpConnect()

Definition at line 338 of file EmaiSMTP.hpp.

References Emai::CheckErrorCode(), EmaiSmtpConnect(), and Emai::Object< EmaiSmtpSession >::mObject.

00343 {
00344     CheckErrorCode(EmaiSmtpConnect(mObject,
00345                             inMailServer, inPort, inOptions));
00346 }

void Emai::SmtpSession::ConnectEx ( EmaiConstUniCharPtr  inMailServer,
short  inPort = EmaiDefaultSmtpPort,
const EmaiProxyInfo inProxyInfo = NULL,
void *  inUserData = NULL,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

Establishes connection to the server.

Parameters:
EmaiConstCharPtr inMailServer - pointer to the null-teminated string, which contains the name or IP address of the SMTP server
short inPort - port number of the SMTP server
inProxyInfo - proxy server information struct
inUserData - user data specified parameter, use NULL
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiEnumSmtpDefaultPort

EmaiSmtpConnectEx()

Definition at line 349 of file EmaiSMTP.hpp.

References Emai::CheckErrorCode(), EmaiSmtpConnectEx(), and Emai::Object< EmaiSmtpSession >::mObject.

00356 {
00357     CheckErrorCode(EmaiSmtpConnectEx(mObject,
00358                             inMailServer, inPort, inProxyInfo, inUserData, inOptions));
00359 }

void Emai::SmtpSession::Disconnect ( EmaiOptions  inOptions = EmaiNullOptions  )  [inline]

Disconnects the session from the server.

Parameters:
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiSmtpDisconnect()

Definition at line 362 of file EmaiSMTP.hpp.

References Emai::CheckErrorCode(), EmaiSmtpDisconnect(), and Emai::Object< EmaiSmtpSession >::mObject.

00365 {
00366     CheckErrorCode(EmaiSmtpDisconnect(mObject, inOptions));
00367 }

void Emai::SmtpSession::Authenticate ( EmaiConstUniCharPtr  inAccount,
EmaiConstUniCharPtr  inPassword,
EmaiOptions  inOptions = EmaiSMTPAuthAutomatic 
) [inline]

Authenticates the session at the server.

Parameters:
EmaiConstCharPtr inAccount - pointer to the null-teminated string, which conatins account name for authentication
EmaiConstCharPtr inPassword - pointer to null-teminated string, which contains password for authentication
EmaiOptions inOptions - preffered authentication method, i.e. EmaiSMTPAuthAutomatic, EmaiSMTPAuthLogin etc
See also:
EmaiEnumSmtpAuthSelector

EmaiSmtpAuthenticate()

Definition at line 370 of file EmaiSMTP.hpp.

References Emai::CheckErrorCode(), EmaiSmtpAuthenticate(), and Emai::Object< EmaiSmtpSession >::mObject.

00375 {
00376     CheckErrorCode(EmaiSmtpAuthenticate(mObject, inAccount,
00377                             inPassword, inOptions));
00378 }

void Emai::SmtpSession::SendMessage ( const Message inMessage,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

Sends the message.

Parameters:
EmaiMessage inMessage - message to be sent
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiSmtpSendMessage()

Definition at line 381 of file EmaiSMTP.hpp.

References Emai::CheckErrorCode(), EmaiSmtpSendMessage(), and Emai::Object< EmaiSmtpSession >::mObject.

00385 {
00386     CheckErrorCode(EmaiSmtpSendMessage(mObject, inMessage, inOptions));
00387 }

void Emai::SmtpSession::SendMessageEx ( const Message inMessage,
StringList outFailedRecipients,
EmaiOptions  inOptions = EmaiNullOptions 
) [inline]

Sends the message.

Parameters:
EmaiMessage inMessage - message to be sent
outFailedRecipients - failes recipients list
EmaiOptions inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiSmtpSendMessage()

Definition at line 390 of file EmaiSMTP.hpp.

References Emai::CheckErrorCode(), EmaiSmtpSendMessageEx(), and Emai::Object< EmaiSmtpSession >::mObject.

00395 {
00396     EmaiStringList stringList = NULL;
00397     CheckErrorCode(EmaiSmtpSendMessageEx(mObject, inMessage, &stringList, inOptions));
00398     if (stringList != NULL)
00399         outFailedRecipients = StringList(stringList, true);
00400 }

void Emai::SmtpSession::Cancel ( EmaiOptions  inOptions = EmaiNullOptions  )  [inline]

Marks the SMTP session to be cancelled ASAP.

Parameters:
EmaiOptions inOptions
See also:
EmaiSmtpCancel()

Definition at line 403 of file EmaiSMTP.hpp.

References Emai::CheckErrorCode(), EmaiSmtpCancel(), and Emai::Object< EmaiSmtpSession >::mObject.

00406 {
00407     CheckErrorCode(EmaiSmtpCancel(mObject, inOptions));
00408 }

void Emai::SmtpSession::Noop ( EmaiOptions  inOptions = EmaiNullOptions  )  [inline]

Sens NOOP command to the SMTP server. Used to avoid timout disconnection, during inactivity period.

Parameters:
inOptions - not used in current version, use EmaiNullOptions
See also:
EmaiSmtpNoop()

Definition at line 411 of file EmaiSMTP.hpp.

References Emai::CheckErrorCode(), EmaiSmtpNoop(), and Emai::Object< EmaiSmtpSession >::mObject.

00414 {
00415     CheckErrorCode(EmaiSmtpNoop(mObject, inOptions));
00416 }


The documentation for this class was generated from the following file: