GClasses
GClasses::GSmtp Class Reference

Detailed Description

For sending email to an SMTP server.

#include <GSmtp.h>

Public Member Functions

virtual ~GSmtp ()
 
void send ()
 

Static Public Member Functions

static void sendEmail (const char *szTo, const char *szFrom, const char *szSubject, const char *szMessage, const char *szSMPTServer)
 

Protected Types

Protected Member Functions

 GSmtp (const char *szTo, const char *szFrom, const char *szSubject, const char *szMessage, const char *szSMPTServer)
 
void receive (const char *pBuff, size_t nLen)
 
void receiveLine (const char *szLine)
 

Protected Attributes

SmtpState m_eState
 
GTCPClientm_pSocket
 
std::ostringstream m_receiveBuffer
 
const char * m_szFrom
 
const char * m_szMessage
 
const char * m_szSMPTServer
 
const char * m_szSubject
 
const char * m_szTo
 

Member Enumeration Documentation

Enumerator
SS_Init 
SS_Mail 
SS_Rcpt 
SS_Data 
SS_Body 
SS_Quit 
SS_Close 

Constructor & Destructor Documentation

GClasses::GSmtp::GSmtp ( const char *  szTo,
const char *  szFrom,
const char *  szSubject,
const char *  szMessage,
const char *  szSMPTServer 
)
protected
virtual GClasses::GSmtp::~GSmtp ( )
virtual

Member Function Documentation

void GClasses::GSmtp::receive ( const char *  pBuff,
size_t  nLen 
)
protected
void GClasses::GSmtp::receiveLine ( const char *  szLine)
protected
void GClasses::GSmtp::send ( )
static void GClasses::GSmtp::sendEmail ( const char *  szTo,
const char *  szFrom,
const char *  szSubject,
const char *  szMessage,
const char *  szSMPTServer 
)
static

Member Data Documentation

SmtpState GClasses::GSmtp::m_eState
protected
GTCPClient* GClasses::GSmtp::m_pSocket
protected
std::ostringstream GClasses::GSmtp::m_receiveBuffer
protected
const char* GClasses::GSmtp::m_szFrom
protected
const char* GClasses::GSmtp::m_szMessage
protected
const char* GClasses::GSmtp::m_szSMPTServer
protected
const char* GClasses::GSmtp::m_szSubject
protected
const char* GClasses::GSmtp::m_szTo
protected