Attachment [file]name.
This commit is contained in:
parent
29df79e4e5
commit
4927c22948
@ -24,6 +24,7 @@
|
|||||||
#include "vmime/defaultAttachment.hpp"
|
#include "vmime/defaultAttachment.hpp"
|
||||||
|
|
||||||
#include "vmime/contentDisposition.hpp"
|
#include "vmime/contentDisposition.hpp"
|
||||||
|
#include "vmime/contentDispositionField.hpp"
|
||||||
#include "vmime/encoding.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);
|
if (!m_desc.isEmpty()) part->getHeader()->ContentDescription()->setValue(m_desc);
|
||||||
part->getHeader()->ContentTransferEncoding()->setValue(m_encoding);
|
part->getHeader()->ContentTransferEncoding()->setValue(m_encoding);
|
||||||
part->getHeader()->ContentDisposition()->setValue(contentDisposition(contentDispositionTypes::ATTACHMENT));
|
part->getHeader()->ContentDisposition()->setValue(contentDisposition(contentDispositionTypes::ATTACHMENT));
|
||||||
|
part->getHeader()->ContentDisposition().dynamicCast <contentDispositionField>()->setFilename(m_name);
|
||||||
|
|
||||||
// Set contents
|
// Set contents
|
||||||
part->getBody()->setContents(m_data);
|
part->getBody()->setContents(m_data);
|
||||||
|
Loading…
Reference in New Issue
Block a user