diff options
author | Vincent Richard <[email protected]> | 2013-07-11 16:06:26 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-07-11 16:06:26 +0000 |
commit | b886cd48649c09561417b378b9c1f932d6e72dd8 (patch) | |
tree | 8417a5de917a1b82a5ce7b67bb6e5abbb4bb8207 /examples | |
parent | Update example to test STATUS command. (diff) | |
download | vmime-b886cd48649c09561417b378b9c1f932d6e72dd8.tar.gz vmime-b886cd48649c09561417b378b9c1f932d6e72dd8.zip |
Refactored the way embedded objects are referenced in MHTML.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/example3.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/example3.cpp b/examples/example3.cpp index 038f3ba6..31e26534 100644 --- a/examples/example3.cpp +++ b/examples/example3.cpp @@ -86,12 +86,13 @@ int main() vmime::create <vmime::streamContentHandler> (fileReader->getInputStream(), imageFile->getLength()); - const vmime::string cid = textPart.addObject(imageCts, - vmime::mediaType(vmime::mediaTypes::IMAGE, vmime::mediaTypes::IMAGE_JPEG)); + vmime::ref <const vmime::htmlTextPart::embeddedObject> obj = textPart.addObject + (imageCts, vmime::mediaType(vmime::mediaTypes::IMAGE, vmime::mediaTypes::IMAGE_JPEG)); // -- message text textPart.setText(vmime::create <vmime::stringContentHandler> - (vmime::string("This is the <b>HTML text</b>.<br/><img src=\"") + cid + vmime::string("\"/>"))); + (vmime::string("This is the <b>HTML text</b>.<br/>" + "<img src=\"") + obj->getReferenceId() + vmime::string("\"/>"))); textPart.setPlainText(vmime::create <vmime::stringContentHandler> ("This is the plain text (without HTML formatting).")); |