Commit 1f4f4049 authored by David Faure's avatar David Faure

Finish removing the user agent from sent emails.

Summary:
Commit 6296818e (https://bugs.kde.org/show_bug.cgi?id=359964)
only did it partially, the unittest messagefactorytest was still failing
due to the useragent being present in many cases.

This fixes many test failures in that test, there's still one though:
testCreateReplyToAllWithUseSenderAndIdentityInCC shows a
"X-KMail-Identity: 2109233399" header and a wrong From field.

Test Plan: messagefactorytest

Reviewers: mlaurent, dvratil

Reviewed By: mlaurent, dvratil

Subscribers: #kde_pim

Tags: #kde_pim

Differential Revision: https://phabricator.kde.org/D4809
parent 5328082f
......@@ -46,9 +46,6 @@ void initHeader(const KMime::Message::Ptr &message, const KIdentityManagement::I
message->removeHeader<KMime::Headers::Subject>();
message->date()->setDateTime(QDateTime::currentDateTime());
const QStringList extraInfo = QStringList() << QString::fromLocal8Bit(MESSAGELIB_GIT_REVISION_STRING) << QString::fromLocal8Bit(MESSAGELIB_GIT_LAST_CHANGE);
message->userAgent()->fromUnicodeString(KProtocolManager::userAgentForApplication(QString::fromLocal8Bit("KMail"), QString::fromLocal8Bit(MESSAGELIB_GIT_REVISION_STRING), extraInfo), QLatin1String("utf-8").latin1());
// This will allow to change Content-Type:
message->contentType()->setMimeType("text/plain");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment