6 #ifndef _INC_cMailMessage_H
7 #define _INC_cMailMessage_H
12 #include "../GrayLibBase.h"
25 #define cMailTagDEF(a,b,c,d) MAIL_TAG_##a,
52 return CheckValidEmailAddressFormat(m_sAddr);
55 static bool GRAYCALL IsValidEmailAddressChar(
wchar_t ch);
56 static HRESULT GRAYCALL CheckValidEmailAddressFormat(
const char* pszEmail);
72 : m_eTag(eTag), m_sVal(sVal)
114 HRESULT CheckValidMessage()
const;
116 cStringA GetToEntry(
int i = 0)
const;
117 ITERATE_t SetToList(
const char* pszDestList);
119 bool HasTag(
MAIL_TAG_TYPE eTag,
const char* pszVal=
nullptr)
const;
124 HRESULT put_BodyStr(
const char* pszBody);
#define GRAYCALL
declare calling convention for static functions so everyone knows the arg passing scheme....
Definition: GrayCore.h:36
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
Definition: cMailMessage.h:87
cArrayStringA m_aBody
body text of the message. each line to be followed by CR
Definition: cMailMessage.h:108
cArraySortStructHash< cMailTag > m_aTags
SMTP tags that are in this message. e.g. MAIL_TAG_From, MAIL_TAG_Subject.
Definition: cMailMessage.h:96
cMailName m_From
Source email address. MAIL FROM: and MAIL_TAG_From.
Definition: cMailMessage.h:100
cArrayStruct< cMailName > m_aCC
list of destination email address(s). CC: BCC:
Definition: cMailMessage.h:104
cArrayStruct< cMailName > m_aTo
list of destination email address(s). TO: MAIL_TAG_To
Definition: cMailMessage.h:103
bool m_bFormatHTML
Encode the message body as HTML or not. MAIL_TAG_Content_Type = MIME_HTML.
Definition: cMailMessage.h:107
UNITTEST_FRIEND(cMailMessage)
Definition: cMailMessage.h:32
cStringA m_sAddr
Email address. e.g. "name@menasoft.com".
Definition: cMailMessage.h:39
cStringA m_sName
Friendly name. e.g. "Dennis Robinson".
Definition: cMailMessage.h:40
HRESULT CheckValidEmailAddressFormat() const
Definition: cMailMessage.h:50
cMailName(cStringA sAddr="", cStringA sName="")
Definition: cMailMessage.h:43
Definition: cMailMessage.h:60
cStringA m_sVal
the value may be int,'string' or enum constant.
Definition: cMailMessage.h:68
MAIL_TAG_TYPE get_HashCode() const noexcept
Definition: cMailMessage.h:75
cMailTag(MAIL_TAG_TYPE eTag=MAIL_TAG_UNK, cStringA sVal="") noexcept
Definition: cMailMessage.h:71
MAIL_TAG_TYPE m_eTag
What tag type? one of each per header. order is not important.
Definition: cMailMessage.h:67
Definition: cArraySort.h:363
Definition: cStream.h:126
UNITTEST2_PREDEF(cQuadtree)
MAIL_TAG_TYPE
Definition: cMailMessage.h:21
@ MAIL_TAG_QTY
Definition: cMailMessage.h:28
@ MAIL_TAG_UNK
Definition: cMailMessage.h:24
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 ITERATE_t
like size_t but signed
Definition: Index.h:28