|
#ifndef __MAILENGINE_H_
#define __MAILENGINE_H_
#include "OXThreadEngine.h"
#include "OXSendMail.h"
#include "MailCmd.h"
#define MR_MMERR_SUCCESS 0x0000
#define MR_MMERR_LOGON 0x0101
#define MR_MMERR_RECIPIENT 0x0102
#define MR_MMERR_SENT 0x0103
#define MR_MMERR_HOMEID 0x0104
class CMailEngine : public COXThreadEngine
{
// Data Members
public:
protected:
COXSendMail m_sendMail;
private:
static short defError;
// Member Functions
public:
CMailEngine();
virtual ~CMailEngine();
BOOL LogOn(CString sProfile, CString sPassword);
void LogOff();
BOOL IsLoggedOn();
BOOL Send(CString sMAPIProfile,
CString sMAPIPassword,
CString sRecipient,
CString sSubject,
CString sContent,
const CStringArray& sAttachments,
short& nError = defError);
protected:
virtual void OnExecuteCmd(COXEngineCmd* pCmd);
virtual void OnThreadDestruction();
void OnLogOn(CMCLogOn& cmd);
void OnLogOff(CMCLogOff& cmd);
void OnSend(CMCSend& cmd);
private:
};
extern CMailEngine theMailEngine;
#endif // __MAILENGINE_H_
|
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.
In January 2005, David Cunningham and Chris Maunder created TheUltimateToolbox.com, a new group dedicated to the continued development, support and growth of Dundas Software’s award winning line of MFC, C++ and ActiveX control products.
Ultimate Grid for MFC, Ultimate Toolbox for MFC, and Ultimate TCP/IP have been stalwarts of C++/MFC development for a decade. Thousands of developers have used these products to speed their time to market, improve the quality of their finished products, and enhance the reliability and flexibility of their software.