|
/*
* $Header:$
*
* $Log:$
*/
#include <mapi.h>
class CIMapi
{
public:
CIMapi();
~CIMapi();
enum errorCodes
{
IMAPI_SUCCESS = 0,
IMAPI_LOADFAILED,
IMAPI_INVALIDDLL,
IMAPI_FAILTO,
IMAPI_FAILCC,
IMAPI_FAILATTACH
};
// Attributes
void Subject(LPCTSTR subject) { m_message.lpszSubject = (LPTSTR) subject; }
void Text(LPCTSTR text) { m_text = text; }
UINT Error();
void From(LPCTSTR from) { m_from.lpszName = (LPTSTR) from; }
static BOOL HasEmail();
// Operations
BOOL To(LPCTSTR recip);
BOOL Cc(LPCTSTR recip);
BOOL Attach(LPCTSTR path, LPCTSTR name = NULL);
BOOL Send(ULONG flags = 0);
private:
BOOL AllocNewTo();
MapiMessage m_message;
MapiRecipDesc m_from;
UINT m_error;
CString m_text;
ULONG (PASCAL *m_lpfnSendMail)(ULONG, ULONG, MapiMessage*, FLAGS, ULONG);
static HINSTANCE m_hInstMail;
static BOOL m_isMailAvail;
};
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.
A list of licenses authors might use can be found here