Sample code for 30+ languages & platforms
Unicode C++ Requires Chilkat v11.0.0+

Transition from MailMan.LoadEml to Email.LoadEml

Provides instructions for replacing deprecated MailMan.LoadEml method calls with Email.LoadEml.

Chilkat Unicode C++ Downloads

Unicode C++
#include <CkMailManW.h>
#include <CkEmailW.h>

void ChilkatSample(void)
    {
    bool success = false;

    CkMailManW mailman;

    //  ...
    //  ...

    const wchar_t *filePath = L"c:/dir/example.eml";

    //  ------------------------------------------------------------------------
    //  The MailMan.LoadEml method is deprecated:

    CkEmailW *emailObj = mailman.LoadEml(filePath);
    if (mailman.get_LastMethodSuccess() == false) {
        wprintf(L"%s\n",mailman.lastErrorText());
        return;
    }

    //  ...
    //  ...

    delete emailObj;

    //  ------------------------------------------------------------------------
    //  Do the equivalent using Email.LoadEml.

    CkEmailW email;
    success = email.LoadEml(filePath);
    if (success == false) {
        wprintf(L"%s\n",email.lastErrorText());
        return;
    }
    }