[mimetic-users] Fwd: Constructing an email with multipart body
Brought to you by:
tat0o
|
From: Or G. <ob...@gm...> - 2018-02-24 02:34:57
|
Hi,
The example on the website only shows how to construct an email with a
plain text message.
How do I construct an email where the body is a multipart ?
I tried this:
MimeEntity msg;
msg.header().subject("Test");
msg.header().to(mimetic::AddressList("fo...@fo..."));
msg.header().messageid(MessageId());
mimetic::MultipartEntity *body = new mimetic::MultipartEntity;
mimetic::ContentType::Boundary boundary;
mimetic::ContentType ct("multipart", "related");
ct.paramList().push_back(mimetic::ContentType::Param("boundary", boundary));
body->header().contentType(ct);
msg.body().parts().push_back(body);
cout << msg;
This doesnt show a body at all in stdout.
Thanks,
Or
|