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

#include <cMailMessage.h>

Public Member Functions

 cMailName (cStringA sAddr="", cStringA sName="")
 
StrLen_t GRAYCALL SetParsedName (const char *pszLine)
 
cStringA GetFullName () const
 
HRESULT CheckValidEmailAddressFormat () const
 

Static Public Member Functions

static bool GRAYCALL IsValidEmailAddressChar (wchar_t ch)
 
static HRESULT GRAYCALL CheckValidEmailAddressFormat (const char *pszEmail)
 

Public Attributes

cStringA m_sAddr
 Email address. e.g. "name@menasoft.com". More...
 
cStringA m_sName
 Friendly name. e.g. "Dennis Robinson". More...
 

Detailed Description

an email address + friendly name pair. ASCII chars where upper and lower case are equiv. Used for TO: CC: and BCC: fields.

Constructor & Destructor Documentation

◆ cMailName()

GrayLib::cMailName::cMailName ( cStringA  sAddr = "",
cStringA  sName = "" 
)
inline

Member Function Documentation

◆ CheckValidEmailAddressFormat() [1/2]

HRESULT GrayLib::cMailName::CheckValidEmailAddressFormat ( ) const
inline

◆ CheckValidEmailAddressFormat() [2/2]

HRESULT GrayLib::cMailName::CheckValidEmailAddressFormat ( const char *  pszEmail)
static

Is this string a generally valid email address ?

Returns
HRESULT describing what is wrong with it. or offset of the @ symbol. https://en.wikipedia.org/wiki/Email_address

◆ GetFullName()

cStringA GrayLib::cMailName::GetFullName ( ) const

Re-combine the names.

◆ IsValidEmailAddressChar()

bool GrayLib::cMailName::IsValidEmailAddressChar ( wchar_t  ch)
static

Valid characters are, numbers, letters, underscore "_", dash "-" and the dot "."). Technically others are valid too: space, ? https://en.wikipedia.org/wiki/Email_address

◆ SetParsedName()

StrLen_t GrayLib::cMailName::SetParsedName ( const char *  pszLine)
  • pszLine in format: email; ""Name" <email>;" "Name[email];"
    Returns
    Length of the string parsed.

Member Data Documentation

◆ m_sAddr

cStringA GrayLib::cMailName::m_sAddr

Email address. e.g. "name@menasoft.com".

◆ m_sName

cStringA GrayLib::cMailName::m_sName

Friendly name. e.g. "Dennis Robinson".


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