From d8b322a304c3b8945af193cfcc70da2aaabfdcde Mon Sep 17 00:00:00 2001 From: Thomas McGuire Date: Tue, 20 Jan 2009 17:01:48 +0000 Subject: [PATCH] Not only set the boundary, but the complete content-type when signing/encypting. This should fix the missing charset parameter for signed messages. Needs a bit more testing (inline invitations, HTML images etc), but hey, this is trunk again :) svn path=/trunk/KDE/kdepim/; revision=914215 --- messagecomposer.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/messagecomposer.cpp b/messagecomposer.cpp index c603c8ea8..5304931d1 100644 --- a/messagecomposer.cpp +++ b/messagecomposer.cpp @@ -1552,14 +1552,13 @@ void MessageComposer::composeMessage( KMMessage &theMessage, DwBodyPart *dwPart; dwPart = theMessage.createDWBodyPart( &mOldBodyPart ); - // Make sure to set the boundary of the body part, that is the only thing not done - // by createDWBodyPart(). - if ( !mSaveBoundary.empty() ) { - DwHeaders &headers = dwPart->Headers(); - DwMediaType &ct = headers.ContentType(); - ct.SetBoundary( mSaveBoundary ); - } + // Make sure to set the boundary and content-type of the body part, + // that is the only thing not done in createDWBodyPart() + DwHeaders &headers = dwPart->Headers(); + headers.ContentType().FromString( mOldBodyPart.originalContentTypeStr() ); + headers.ContentType().Parse(); dwPart->Assemble(); + mEncodedBody = dwPart->AsString().c_str(); delete dwPart; dwPart = 0;