diff --git a/src/mimemessage.cpp b/src/mimemessage.cpp index dacec92..211fdc6 100644 --- a/src/mimemessage.cpp +++ b/src/mimemessage.cpp @@ -33,13 +33,19 @@ MimeMessage::MimeMessage(bool createAutoMimeContent) : MimeMessage::~MimeMessage() { - } /* [1] --- */ /* [2] Getters and Setters */ +MimePart& MimeMessage::getContent() { + return *content; +} + +void MimeMessage::setContent(MimePart *content) { + this->content = content; +} void MimeMessage::setSender(EmailAddress* e) { diff --git a/src/mimemessage.h b/src/mimemessage.h index db596dd..d0297d1 100644 --- a/src/mimemessage.h +++ b/src/mimemessage.h @@ -59,6 +59,8 @@ public: const QString & getSubject() const; const QList & getParts() const; + MimePart& getContent(); + void setContent(MimePart *content); /* [2] --- */ diff --git a/src/mimemultipart.cpp b/src/mimemultipart.cpp index c7d1dbd..19d4729 100644 --- a/src/mimemultipart.cpp +++ b/src/mimemultipart.cpp @@ -36,7 +36,6 @@ MimeMultiPart::MimeMultiPart(MultiPartType type) this->cType = MULTI_PART_NAMES[this->type]; this->cEncoding = _8Bit; - qsrand(QTime::currentTime().msec()); QCryptographicHash md5(QCryptographicHash::Md5); md5.addData(QByteArray().append(qrand())); cBoundary = md5.result().toHex(); @@ -71,6 +70,7 @@ void MimeMultiPart::prepare() { void MimeMultiPart::setMimeType(const MultiPartType type) { this->type = type; + this->cType = MULTI_PART_NAMES[type]; } MimeMultiPart::MultiPartType MimeMultiPart::getMimeType() const { diff --git a/src/mimemultipart.h b/src/mimemultipart.h index 256af2c..8a85b6f 100644 --- a/src/mimemultipart.h +++ b/src/mimemultipart.h @@ -67,7 +67,6 @@ protected: QList< MimePart* > parts; MultiPartType type; - };