Attachment [file]name.

This commit is contained in:
Vincent Richard 2006-09-04 16:16:00 +00:00
parent 29df79e4e5
commit 4927c22948

View File

@ -24,6 +24,7 @@
#include "vmime/defaultAttachment.hpp"
#include "vmime/contentDisposition.hpp"
#include "vmime/contentDispositionField.hpp"
#include "vmime/encoding.hpp"
@ -93,6 +94,7 @@ void defaultAttachment::generatePart(ref <bodyPart> part) const
if (!m_desc.isEmpty()) part->getHeader()->ContentDescription()->setValue(m_desc);
part->getHeader()->ContentTransferEncoding()->setValue(m_encoding);
part->getHeader()->ContentDisposition()->setValue(contentDisposition(contentDispositionTypes::ATTACHMENT));
part->getHeader()->ContentDisposition().dynamicCast <contentDispositionField>()->setFilename(m_name);
// Set contents
part->getBody()->setContents(m_data);