Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cMailSMTPClient.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cMailSMTPClient_H
7 #define _INC_cMailSMTPClient_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "../Net/cNetPort.h" // NET_PORT_t
13 
14 namespace GrayLib
15 {
17  class cNetSocket;
18  class cNetAddrName;
19  class cMailMessage;
20 
22  {
25 
26  protected:
28 
29  private:
30  HRESULT ReceiveResponse(cNetSocket& Socket, TIMESECD_t iWaitSeconds = 20);
31 
32  protected:
33  HRESULT SendLineN(cNetSocket& Socket, const char* pszLine, StrLen_t iLen);
34  HRESULT _cdecl SendLineF(cNetSocket& Socket, const char* pszFormat, ...);
35 
36  public:
38  ~cMailSMTPClient();
39 
40  static const NET_PORT_t k_IPPORT_SMTP = 25;
41 
42  // Synchronous send.
43  HRESULT SendMail(cNetAddrName* pGatewayAddr, const char* pszSrcHost, cMailMessage& msg);
44  const char* get_LastResponse() const
45  {
46  return m_sResponse;
47  }
48 
50  };
51 }
52 #endif // _INC_cMailSMTPClient_H
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: cMailMessage.h:87
Definition: cMailSMTPClient.h:22
UNITTEST_FRIEND(cMailSMTPClient)
cStringA m_sResponse
store response from SendMail() -> ReceiveResponse()
Definition: cMailSMTPClient.h:27
const char * get_LastResponse() const
Definition: cMailSMTPClient.h:44
Definition: cNetAddrName.h:21
Definition: cNetSocket.h:185
Definition: cMesh.h:22
WORD NET_PORT_t
WinINet calls ports NET_PORT_t INTERNET_PORT = a service.
Definition: cNetPort.h:21
UNITTEST2_PREDEF(cQuadtree)
int StrLen_t
the length of a string in chars (bytes for UTF8, wchar_t for UNICODE). or offset in characters....
Definition: StrConst.h:32
int TIMESECD_t
signed delta seconds. like TIMESEC_t. redefined in TimeUnits.h.
Definition: cTimeSys.h:19