C++
C++
Load MIME Object from Email Object
See more Email Object Examples
Demonstrates how to load a Chilkat Mime object from a Chilkat Email object. (Copies the email into a Mime object.)Chilkat C++ Downloads
#include <CkEmail.h>
#include <CkStringBuilder.h>
#include <CkMime.h>
void ChilkatSample(void)
{
bool success = false;
CkEmail email;
success = email.LoadEml("qa_data/eml/sample.eml");
// Write the full MIME of the email to a StringBuilder.
CkStringBuilder sbMime;
email.GetMimeSb(sbMime);
// Load the MIME object from the StringBuilder
CkMime mime;
success = mime.LoadMimeSb(sbMime);
std::cout << mime.getMime() << "\r\n";
}