Add-Ons & Services

MailMessage and multipart/alternative

Please post support and help requests here.

MailMessage and multipart/alternative

Postby burche » 12 Apr 2012, 15:05

I use Poco for couple of months already and I like it very much, great library.

I have a problem with compiling an email message that will have both text/plain and text/html parts (plus attachments). I realize that I need to have one main multipart/mixed part that will contain a child|embedded multipart/alternative that will hold both plain text and html parts. So, I need two boundaries, one inside the other.

However, it seems doing this is not quite possible (or I am not seeing a way?). I tried overloading the write method:

Code: Select all
virtual void write(std::ostream& ostr) const;
, the only one virtual I could do something in, I tried implementing the writeMultipart myself (copied from the MailMessage) and to insert the alternative part somewhere before the final closing boundary is written to the stream, but the _parts variable is private and I cannot access it (without recompiling the library, what I don't won't to do) and I don't see any other way of doing this (at least at the moment).

So, is there a way to insert the secondary boundary inside the main multipart/mixed boundary? Any help is much appreciated.
Posts: 4
Joined: 28 Mar 2012, 13:35

Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests