Free Support Forum - aspose.com

Aspose.Email for C++ example codes

Hi,
Is your example code and project supposed to work as such in evaluation version of Aspose.Email for C++? I downloaded Aspose.Email.Examples.Cpp from your web site and build it. I try to run LoadingEMLAndSavingToMSG(), but I got erros both on loading and saving EML file.

// Initialize and Load an existing EML file by specifying the MessageFormat

System::SharedPtr eml = MailMessage::Load(dataDir + L"Message.eml");

->
Causes following error in output:

DisposeGuard: Lack of Dispose call has been detected for resource: “System::IO::MemoryStream” at class System::SharedPtr __cdecl Aspose::email::Mime::MimeDocumentReader::DecodeContent(class System::SharedPtr,class System::SharedPtr):337

// Save the Email message to disk in ASCII format and Unicode format

eml->Save(dataDir + L"AnEmail_out.msg", SaveOptions::get_DefaultMsgUnicode());

->Causes following error in output:
DisposeGuard: Lack of Dispose call has been detected for resource: “System::IO::MemoryStream” at class System::String __cdecl Aspose::email::TransformUtil::HtmlToText(class System::String,class System::SharedPtr):381

@MarkoA,

We are looking into this issue for possible cause of issue and will soon update you with our findings here.

@MarkoA,

These are not errors/exceptoins but Debug messages that only appear when run examples in Debug mode. If you switch to release configuration, these messages are not displayed.