diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-02 17:06:20 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-02 17:06:20 -0600 |
commit | 28f66010b29bb9ec3def398f6e10b14af5bdaa02 (patch) | |
tree | e1e18926e11a9bf7fa72a4498c745b616a812f1d | |
parent | dd5b2a520f44df65fd88cf8c4040905054adaee1 (diff) | |
download | kube-28f66010b29bb9ec3def398f6e10b14af5bdaa02.tar.gz kube-28f66010b29bb9ec3def398f6e10b14af5bdaa02.zip |
Set the plain type for plain mails
-rw-r--r-- | framework/src/domain/mime/mailtemplates.cpp | 1 | ||||
-rw-r--r-- | framework/src/domain/mime/tests/mailtemplatetest.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/framework/src/domain/mime/mailtemplates.cpp b/framework/src/domain/mime/mailtemplates.cpp index ce1cd52f..8c7904e0 100644 --- a/framework/src/domain/mime/mailtemplates.cpp +++ b/framework/src/domain/mime/mailtemplates.cpp | |||
@@ -972,6 +972,7 @@ KMime::Message::Ptr MailTemplates::createMessage(KMime::Message::Ptr existingMes | |||
972 | } else { | 972 | } else { |
973 | //FIXME same implementation as above for attachments | 973 | //FIXME same implementation as above for attachments |
974 | mail->setBody(body.toUtf8()); | 974 | mail->setBody(body.toUtf8()); |
975 | mail->contentType(true)->setMimeType("text/plain"); | ||
975 | } | 976 | } |
976 | 977 | ||
977 | mail->assemble(); | 978 | mail->assemble(); |
diff --git a/framework/src/domain/mime/tests/mailtemplatetest.cpp b/framework/src/domain/mime/tests/mailtemplatetest.cpp index eccb3aa7..cc0fd61e 100644 --- a/framework/src/domain/mime/tests/mailtemplatetest.cpp +++ b/framework/src/domain/mime/tests/mailtemplatetest.cpp | |||
@@ -124,6 +124,7 @@ private slots: | |||
124 | QCOMPARE(result->subject()->asUnicodeString(), subject); | 124 | QCOMPARE(result->subject()->asUnicodeString(), subject); |
125 | QCOMPARE(result->body(), body.toUtf8()); | 125 | QCOMPARE(result->body(), body.toUtf8()); |
126 | QVERIFY(result->date(false)->dateTime().isValid()); | 126 | QVERIFY(result->date(false)->dateTime().isValid()); |
127 | QVERIFY(result->contentType()->isMimeType("text/plain")); | ||
127 | } | 128 | } |
128 | 129 | ||
129 | void testCreatePlainMailWithAttachments() | 130 | void testCreatePlainMailWithAttachments() |