diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-23 17:05:07 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-23 17:05:07 -0600 |
commit | 25b4f6e2d7ed2d783b8ee1eefbe62df713ca0341 (patch) | |
tree | 140e95abd2512f42d978837e1698d17f7c2bae28 /framework/src | |
parent | 882dbeee8406bb766d7d92c0b8c501731c29abc7 (diff) | |
download | kube-25b4f6e2d7ed2d783b8ee1eefbe62df713ca0341.tar.gz kube-25b4f6e2d7ed2d783b8ee1eefbe62df713ca0341.zip |
Get mailtemplatetest to pass
Diffstat (limited to 'framework/src')
-rw-r--r-- | framework/src/domain/mime/mailtemplates.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/framework/src/domain/mime/mailtemplates.cpp b/framework/src/domain/mime/mailtemplates.cpp index 79275bda..2c4dda04 100644 --- a/framework/src/domain/mime/mailtemplates.cpp +++ b/framework/src/domain/mime/mailtemplates.cpp | |||
@@ -957,6 +957,7 @@ KMime::Message::Ptr MailTemplates::createMessage(KMime::Message::Ptr existingMes | |||
957 | if (!mail->date(true)->dateTime().isValid()) { | 957 | if (!mail->date(true)->dateTime().isValid()) { |
958 | mail->date(true)->setDateTime(QDateTime::currentDateTimeUtc()); | 958 | mail->date(true)->setDateTime(QDateTime::currentDateTimeUtc()); |
959 | } | 959 | } |
960 | mail->assemble(); | ||
960 | 961 | ||
961 | KMime::Content *bodyPart; | 962 | KMime::Content *bodyPart; |
962 | if (!attachments.isEmpty()) { | 963 | if (!attachments.isEmpty()) { |
@@ -972,7 +973,7 @@ KMime::Message::Ptr MailTemplates::createMessage(KMime::Message::Ptr existingMes | |||
972 | } else { | 973 | } else { |
973 | bodyPart = createBodyPart(body.toUtf8()); | 974 | bodyPart = createBodyPart(body.toUtf8()); |
974 | } | 975 | } |
975 | mail->assemble(); | 976 | bodyPart->assemble(); |
976 | 977 | ||
977 | KMime::Content *signedResult = nullptr; | 978 | KMime::Content *signedResult = nullptr; |
978 | if (!signingKeys.empty()) { | 979 | if (!signingKeys.empty()) { |
@@ -982,11 +983,11 @@ KMime::Message::Ptr MailTemplates::createMessage(KMime::Message::Ptr existingMes | |||
982 | return {}; | 983 | return {}; |
983 | } | 984 | } |
984 | } else { | 985 | } else { |
985 | if (!mail->contentType(false)) { | 986 | if (!bodyPart->contentType(false)) { |
986 | mail->contentType(true)->setMimeType("text/plain"); | 987 | bodyPart->contentType(true)->setMimeType("text/plain"); |
988 | bodyPart->assemble(); | ||
987 | } | 989 | } |
988 | } | 990 | } |
989 | mail->assemble(); | ||
990 | 991 | ||
991 | const QByteArray allData = mail->head() + (signedResult ? signedResult->encodedContent() : bodyPart->encodedContent()); | 992 | const QByteArray allData = mail->head() + (signedResult ? signedResult->encodedContent() : bodyPart->encodedContent()); |
992 | delete bodyPart; | 993 | delete bodyPart; |