Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
GrayLib::cMailSMTPClient Class Reference

#include <cMailSMTPClient.h>

Public Member Functions

 cMailSMTPClient ()
 
 ~cMailSMTPClient ()
 
HRESULT SendMail (cNetAddrName *pGatewayAddr, const char *pszSrcHost, cMailMessage &msg)
 
const char * get_LastResponse () const
 
 UNITTEST_FRIEND (cMailSMTPClient)
 

Static Public Attributes

static const NET_PORT_t k_IPPORT_SMTP = 25
 default port for destination SMTP server/gateway.. dupe from <winsock.h> More...
 

Protected Member Functions

HRESULT SendLineN (cNetSocket &Socket, const char *pszLine, StrLen_t iLen)
 
HRESULT _cdecl SendLineF (cNetSocket &Socket, const char *pszFormat,...)
 

Protected Attributes

cStringA m_sResponse
 store response from SendMail() -> ReceiveResponse() More...
 

Detailed Description

SMTP Mail sending client/helper class. send message to SMTP server.

Constructor & Destructor Documentation

◆ cMailSMTPClient()

GrayLib::cMailSMTPClient::cMailSMTPClient ( )

◆ ~cMailSMTPClient()

GrayLib::cMailSMTPClient::~cMailSMTPClient ( )

Member Function Documentation

◆ get_LastResponse()

const char* GrayLib::cMailSMTPClient::get_LastResponse ( ) const
inline

◆ SendLineF()

HRESULT _cdecl GrayLib::cMailSMTPClient::SendLineF ( cNetSocket Socket,
const char *  pszFormat,
  ... 
)
protected

◆ SendLineN()

HRESULT GrayLib::cMailSMTPClient::SendLineN ( cNetSocket Socket,
const char *  pszLine,
StrLen_t  iLen 
)
protected

Send a command line. Assume the line is terminated correctly. HTTP_CR or
depending.

◆ SendMail()

HRESULT GrayLib::cMailSMTPClient::SendMail ( cNetAddrName pGatewayAddr,
const char *  pszSrcHost,
cMailMessage msg 
)

Send a STMP mail message. See RFC 821 for more on this. default mail port = 25 (normally)

  • pGatewayAddr = use this as my STMP gateway (if available) else use m_aDst directly. pszSrcHost = my IP address. SrcAddr.get_HostStr(). many receivers require the client to have a public DNS entry that points back to themselves.
    Note
    This will block the current thread!

◆ UNITTEST_FRIEND()

GrayLib::cMailSMTPClient::UNITTEST_FRIEND ( cMailSMTPClient  )

Member Data Documentation

◆ k_IPPORT_SMTP

const NET_PORT_t GrayLib::cMailSMTPClient::k_IPPORT_SMTP = 25
static

default port for destination SMTP server/gateway.. dupe from <winsock.h>

◆ m_sResponse

cStringA GrayLib::cMailSMTPClient::m_sResponse
protected

store response from SendMail() -> ReceiveResponse()


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