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

#include <cMailMessage.h>

Public Member Functions

 cMailMessage ()
 
 ~cMailMessage ()
 
HRESULT CheckValidMessage () const
 
cStringA GetToEntry (int i=0) const
 
ITERATE_t SetToList (const char *pszDestList)
 
bool HasTag (MAIL_TAG_TYPE eTag, const char *pszVal=nullptr) const
 
cStringA GetTag (MAIL_TAG_TYPE eTag) const
 
HRESULT SetTag (MAIL_TAG_TYPE eTag, cStringA sVal)
 
void SetTagInt (MAIL_TAG_TYPE eTag, int iVal)
 
HRESULT put_BodyStr (const char *pszBody)
 
HRESULT SendMailMessage (cStreamOutput &o, bool bBody=true)
 
 UNITTEST_FRIEND (cMailMessage)
 

Public Attributes

cMailName m_From
 Source email address. MAIL FROM: and MAIL_TAG_From. More...
 
cArrayStruct< cMailNamem_aTo
 list of destination email address(s). TO: MAIL_TAG_To More...
 
cArrayStruct< cMailNamem_aCC
 list of destination email address(s). CC: BCC: More...
 
bool m_bFormatHTML
 Encode the message body as HTML or not. MAIL_TAG_Content_Type = MIME_HTML. More...
 
cArrayStringA m_aBody
 body text of the message. each line to be followed by CR More...
 

Protected Attributes

cArraySortStructHash< cMailTagm_aTags
 SMTP tags that are in this message. e.g. MAIL_TAG_From, MAIL_TAG_Subject. More...
 

Friends

class cMailTag
 

Detailed Description

Mail message to be sent or received with POP or SMTP. Optionally the Mail message header that may be requested from the server without the full message body. like: .NET System.Net.Mail.MailMessage

Constructor & Destructor Documentation

◆ cMailMessage()

GrayLib::cMailMessage::cMailMessage ( )

◆ ~cMailMessage()

GrayLib::cMailMessage::~cMailMessage ( )

Member Function Documentation

◆ CheckValidMessage()

HRESULT GrayLib::cMailMessage::CheckValidMessage ( ) const

Is this message in generally valid format ?

Todo:
call CheckValidEmailAddressFormat ?

◆ GetTag()

cStringA GrayLib::cMailMessage::GetTag ( MAIL_TAG_TYPE  eTag) const

Get a Tags Value

◆ GetToEntry()

cStringA GrayLib::cMailMessage::GetToEntry ( int  i = 0) const

Get MAIL_TAG_To

◆ HasTag()

bool GrayLib::cMailMessage::HasTag ( MAIL_TAG_TYPE  eTag,
const char *  pszVal = nullptr 
) const

◆ put_BodyStr()

HRESULT GrayLib::cMailMessage::put_BodyStr ( const char *  pszBody)

parse the body into lines. either "\n" or "\r\n"

◆ SendMailMessage()

HRESULT GrayLib::cMailMessage::SendMailMessage ( cStreamOutput o,
bool  bBody = true 
)

◆ SetTag()

HRESULT GrayLib::cMailMessage::SetTag ( MAIL_TAG_TYPE  eTag,
cStringA  sVal 
)

Add a Tag

  • eTag = MAIL_TAG_Subject, etc
    Note
    sVal MUST NOT have HTTP_CR inside !!

◆ SetTagInt()

void GrayLib::cMailMessage::SetTagInt ( MAIL_TAG_TYPE  eTag,
int  iVal 
)

Add a Tag

  • eTag = MAIL_TAG_Importance,

◆ SetToList()

ITERATE_t GrayLib::cMailMessage::SetToList ( const char *  pszDestList)

Set a possible list of destinations. MAIL_TAG_To format is "email;"Name" <email>;Name[email];"

◆ UNITTEST_FRIEND()

GrayLib::cMailMessage::UNITTEST_FRIEND ( cMailMessage  )

Friends And Related Function Documentation

◆ cMailTag

friend class cMailTag
friend

Member Data Documentation

◆ m_aBody

cArrayStringA GrayLib::cMailMessage::m_aBody

body text of the message. each line to be followed by CR

◆ m_aCC

cArrayStruct<cMailName> GrayLib::cMailMessage::m_aCC

list of destination email address(s). CC: BCC:

◆ m_aTags

cArraySortStructHash<cMailTag> GrayLib::cMailMessage::m_aTags
protected

SMTP tags that are in this message. e.g. MAIL_TAG_From, MAIL_TAG_Subject.

◆ m_aTo

cArrayStruct<cMailName> GrayLib::cMailMessage::m_aTo

list of destination email address(s). TO: MAIL_TAG_To

◆ m_bFormatHTML

bool GrayLib::cMailMessage::m_bFormatHTML

Encode the message body as HTML or not. MAIL_TAG_Content_Type = MIME_HTML.

◆ m_From

cMailName GrayLib::cMailMessage::m_From

Source email address. MAIL FROM: and MAIL_TAG_From.


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