From e3bb8020e0b91c81047a2f1e7008dd93af78a7e0 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Mon, 18 Feb 2013 22:00:29 +0100 Subject: Process header before transmitting message via SMTP. --- src/bodyPart.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/bodyPart.cpp') diff --git a/src/bodyPart.cpp b/src/bodyPart.cpp index 009a7b8c..fbe9f1ed 100644 --- a/src/bodyPart.cpp +++ b/src/bodyPart.cpp @@ -121,6 +121,12 @@ ref
bodyPart::getHeader() } +void bodyPart::setHeader(ref
h) +{ + m_header = h; +} + + const ref bodyPart::getBody() const { return (m_body); @@ -133,6 +139,19 @@ ref bodyPart::getBody() } +void bodyPart::setBody(ref b) +{ + ref oldPart = b->m_part.acquire(); + + m_body = b; + m_body->setParentPart(thisRef().dynamicCast ()); + + // A body is associated to one and only one part + if (oldPart != NULL) + oldPart->setBody(vmime::create ()); +} + + ref bodyPart::getParentPart() { return m_parent.acquire(); -- cgit