diff --git a/src/mimeattachment.cpp b/src/mimeattachment.cpp index 621ba63..f1b3289 100644 --- a/src/mimeattachment.cpp +++ b/src/mimeattachment.cpp @@ -21,9 +21,13 @@ /* [1] Constructors and Destructors */ -MimeAttachment::MimeAttachment(QFile *file) +MimeAttachment::MimeAttachment(QFile *file, const QString& filename) : MimeFile(file) { + if (!filename.isEmpty()) { + this->setContentName(filename); + } + this->headerLines += "Content-disposition: attachment; filename=\"" + cName + "\"\r\n"; } diff --git a/src/mimeattachment.h b/src/mimeattachment.h index 8b8e4cd..78d26f4 100644 --- a/src/mimeattachment.h +++ b/src/mimeattachment.h @@ -30,7 +30,7 @@ class SMTP_MIME_EXPORT MimeAttachment : public MimeFile /* [1] Constructors and Destructors */ - MimeAttachment(QFile* file); + MimeAttachment(QFile* file, const QString& filename = ""); ~MimeAttachment(); /* [1] --- */ diff --git a/src/mimepart.cpp b/src/mimepart.cpp index 119b363..6f9cb6d 100644 --- a/src/mimepart.cpp +++ b/src/mimepart.cpp @@ -18,7 +18,6 @@ #include #include "mimepart.h" -#include "quotedprintable.h" #include "mimebase64formatter.h" #include "mimeqpformatter.h" #include "mimebase64encoder.h"