aboutsummaryrefslogtreecommitdiffstats
path: root/examples/example2.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-11-21 21:16:57 +0000
committerVincent Richard <[email protected]>2013-11-21 21:16:57 +0000
commitf9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8 (patch)
tree2bdc90e361a8f6e0a81164cf67afec9f78f9b959 /examples/example2.cpp
parentPer-protocol include files. (diff)
downloadvmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.tar.gz
vmime-f9913fa28a27f23fde2d4956c62cbb2fb2bc2ee8.zip
Boost/C++11 shared pointers.
Diffstat (limited to 'examples/example2.cpp')
-rw-r--r--examples/example2.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/example2.cpp b/examples/example2.cpp
index d09a597c..56f01b03 100644
--- a/examples/example2.cpp
+++ b/examples/example2.cpp
@@ -52,24 +52,24 @@ int main()
mb.setExpeditor(vmime::mailbox("[email protected]"));
vmime::addressList to;
- to.appendAddress(vmime::create <vmime::mailbox>("[email protected]"));
+ to.appendAddress(vmime::make_shared <vmime::mailbox>("[email protected]"));
mb.setRecipients(to);
vmime::addressList bcc;
- bcc.appendAddress(vmime::create <vmime::mailbox>("[email protected]"));
+ bcc.appendAddress(vmime::make_shared <vmime::mailbox>("[email protected]"));
mb.setBlindCopyRecipients(bcc);
mb.setSubject(vmime::text("My first message generated with vmime::messageBuilder"));
// Message body
- mb.getTextPart()->setText(vmime::create <vmime::stringContentHandler>(
+ mb.getTextPart()->setText(vmime::make_shared <vmime::stringContentHandler>(
"I'm writing this short text to test message construction " \
"with attachment, using the vmime::messageBuilder component."));
// Adding an attachment
- vmime::ref <vmime::fileAttachment> a = vmime::create <vmime::fileAttachment>
+ vmime::shared_ptr <vmime::fileAttachment> a = vmime::make_shared <vmime::fileAttachment>
(
"./example2.cpp", // full path to file
vmime::mediaType("application/octet-stream"), // content type
@@ -82,7 +82,7 @@ int main()
mb.attach(a);
// Construction
- vmime::ref <vmime::message> msg = mb.construct();
+ vmime::shared_ptr <vmime::message> msg = mb.construct();
// Raw text generation
vmime::string dataToSend = msg->generate();