summaryrefslogtreecommitdiffstats
path: root/framework/src
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src')
-rw-r--r--framework/src/domain/mime/mailtemplates.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/framework/src/domain/mime/mailtemplates.cpp b/framework/src/domain/mime/mailtemplates.cpp
index 8b2b49db..368d0cf3 100644
--- a/framework/src/domain/mime/mailtemplates.cpp
+++ b/framework/src/domain/mime/mailtemplates.cpp
@@ -863,12 +863,14 @@ void MailTemplates::reply(const KMime::Message::Ptr &origMsg, const std::functio
863 auto plainBodyResult = plainBody + plainQuote; 863 auto plainBodyResult = plainBody + plainQuote;
864 htmlMessageText(plainTextContent, htmlContent, stripSignature, [=] (const QString &body, const QString &headElement) { 864 htmlMessageText(plainTextContent, htmlContent, stripSignature, [=] (const QString &body, const QString &headElement) {
865 //The html body is complete 865 //The html body is complete
866 auto htmlBodyResult = htmlBody + quotedHtmlText(body); 866 const auto htmlBodyResult = [&]() {
867 if (alwaysPlain) { 867 if (!alwaysPlain) {
868 htmlBodyResult.clear(); 868 auto htmlBodyResult = htmlBody + quotedHtmlText(body);
869 } else { 869 makeValidHtml(htmlBodyResult, headElement);
870 makeValidHtml(htmlBodyResult, headElement); 870 return htmlBodyResult;
871 } 871 }
872 return QString{};
873 }();
872 874
873 //Assemble the message 875 //Assemble the message
874 addProcessedBodyToMessage(msg, plainBodyResult, htmlBodyResult, false); 876 addProcessedBodyToMessage(msg, plainBodyResult, htmlBodyResult, false);