summaryrefslogtreecommitdiffstats
path: root/framework/src/domain/mime/mailtemplates.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <mollekopf@kolabsystems.com>2017-10-09 17:39:33 +0200
committerChristian Mollekopf <mollekopf@kolabsystems.com>2017-10-09 17:39:33 +0200
commite7792901613067651ec330c49204ddde2dbe34b3 (patch)
treeb6ead620dcd922be24ee36e72ed25681a51af2e2 /framework/src/domain/mime/mailtemplates.cpp
parent705a86fd35e9d3dceac10a088efb7116ef1a3382 (diff)
downloadkube-e7792901613067651ec330c49204ddde2dbe34b3.tar.gz
kube-e7792901613067651ec330c49204ddde2dbe34b3.zip
HtmlBodyResult
Diffstat (limited to 'framework/src/domain/mime/mailtemplates.cpp')
-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);