diff options
Diffstat (limited to 'framework/src/domain/mime/mailtemplates.cpp')
-rw-r--r-- | framework/src/domain/mime/mailtemplates.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/framework/src/domain/mime/mailtemplates.cpp b/framework/src/domain/mime/mailtemplates.cpp index 09932e86..997eb3ae 100644 --- a/framework/src/domain/mime/mailtemplates.cpp +++ b/framework/src/domain/mime/mailtemplates.cpp | |||
@@ -1093,13 +1093,12 @@ KMime::Message::Ptr MailTemplates::createMessage(KMime::Message::Ptr existingMes | |||
1093 | 1093 | ||
1094 | QByteArray bodyData; | 1094 | QByteArray bodyData; |
1095 | if (!signingKeys.empty() || !encryptionKeys.empty()) { | 1095 | if (!signingKeys.empty() || !encryptionKeys.empty()) { |
1096 | auto result = MailCrypto::processCrypto( | 1096 | auto result = MailCrypto::processCrypto(std::move(bodyPart), signingKeys, encryptionKeys, attachedKey); |
1097 | bodyPart.get(), signingKeys, encryptionKeys, attachedKey); | ||
1098 | if (!result) { | 1097 | if (!result) { |
1099 | qWarning() << "Signing failed"; | 1098 | qWarning() << "Crypto failed"; |
1100 | return {}; | 1099 | return {}; |
1101 | } | 1100 | } |
1102 | bodyData = result->encodedContent(); | 1101 | bodyData = result.value()->encodedContent(); |
1103 | } else { | 1102 | } else { |
1104 | if (!bodyPart->contentType(false)) { | 1103 | if (!bodyPart->contentType(false)) { |
1105 | bodyPart->contentType(true)->setMimeType("text/plain"); | 1104 | bodyPart->contentType(true)->setMimeType("text/plain"); |