diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-01-04 22:08:34 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-01-04 22:08:34 +0100 |
commit | 4a5e337479ea102db5444b52878e873a8a432066 (patch) | |
tree | f5282191ee4e95d82d4764b66655f389f4927292 /framework | |
parent | 9190b66c71a33befb17d4f30331da88131bd4957 (diff) | |
download | kube-4a5e337479ea102db5444b52878e873a8a432066.tar.gz kube-4a5e337479ea102db5444b52878e873a8a432066.zip |
Make sure we have a date and a messageid
Diffstat (limited to 'framework')
-rw-r--r-- | framework/domain/composercontroller.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/framework/domain/composercontroller.cpp b/framework/domain/composercontroller.cpp index 7122f201..e97af4c2 100644 --- a/framework/domain/composercontroller.cpp +++ b/framework/domain/composercontroller.cpp | |||
@@ -187,6 +187,13 @@ KMime::Message::Ptr ComposerController::assembleMessage() | |||
187 | 187 | ||
188 | mail->subject(true)->fromUnicodeString(getSubject(), "utf-8"); | 188 | mail->subject(true)->fromUnicodeString(getSubject(), "utf-8"); |
189 | mail->setBody(getBody().toUtf8()); | 189 | mail->setBody(getBody().toUtf8()); |
190 | if (!mail->messageID()) { | ||
191 | mail->messageID(true)->generate("org.kde.kube"); | ||
192 | } | ||
193 | if (!mail->date(true)->dateTime().isValid()) { | ||
194 | mail->date(true)->setDateTime(QDateTime::currentDateTimeUtc()); | ||
195 | } | ||
196 | |||
190 | mail->assemble(); | 197 | mail->assemble(); |
191 | return mail; | 198 | return mail; |
192 | } | 199 | } |