Summary: | Regression: "Forward inline" keeps Cc'ed addresses from the original message listed when composer is opened | ||
---|---|---|---|
Product: | [Unmaintained] kmail | Reporter: | Andreas Gungl <a.gungl> |
Component: | general | Assignee: | Till Adam <adam> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | andres.karner, bugzilla-kde, flavio.tordini, glen, jamundso, psychonaut |
Priority: | NOR | ||
Version: | 1.8 | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Andreas Gungl
2005-02-25 14:08:41 UTC
*** Bug 101681 has been marked as a duplicate of this bug. *** Fixed in HEAD, backport pending. *** Bug 102128 has been marked as a duplicate of this bug. *** CVS commit by tilladam: Backport fix for inline forwarding. It seems safe. BUGS: 100249 M +15 -45 kmmessage.cpp 1.518.2.1 --- kdepim/kmail/kmmessage.cpp #1.518:1.518.2.1 @@ -1158,9 +1158,23 @@ KMMessage* KMMessage::createForward() msg->fromDwString( this->asDwString() ); - msg->cleanupHeader(); // remember the type and subtype, initFromMessage sets the contents type to // text/plain, via initHeader, for unclear reasons const int type = msg->type(); const int subtype = msg->subtype(); + + // Strip out all headers apart from the content description ones, because we + // don't want to inherit them. + DwHeaders& header = msg->mMsg->Headers(); + DwField* field = header.FirstField(); + DwField* nextField; + while (field) + { + nextField = field->Next(); + if ( ! QString( field->FieldNameStr().c_str() ).contains( "ontent" ) ) + header.RemoveField(field); + field = nextField; + } + msg->mMsg->Assemble(); + msg->initFromMessage( this ); //restore type @@ -1174,49 +1188,5 @@ KMMessage* KMMessage::createForward() msg->setSubject( forwardSubject() ); - msg->removePrivateHeaderFields(); - msg->removeHeaderField( "Sender" ); - -#ifdef BROKEN_FOR_OPAQUE_SIGNED_OR_ENCRYPTED_MAILS - QCString str = codecForName(encoding)->fromUnicode(st); - msg->setBody(str); - - if (numBodyParts() > 0) - { - msg->setType( DwMime::kTypeMultipart ); - msg->setSubtype( DwMime::kSubtypeMixed ); - msg->headers().ContentType().CreateBoundary( 0 ); - msg->headers().ContentType().Assemble(); - - msgPart.setTypeStr("text"); - msgPart.setSubtypeStr("plain"); - msgPart.setCharset(encoding); - msgPart.setBody(str); - msg->addBodyPart(&msgPart); - - bool outsideRfc822 = true; - for ( int i = 0; i < numBodyParts(); i++) - { - bodyPart(i, &msgPart); - QCString mimeType( msgPart.typeStr() + '/' + msgPart.subtypeStr() ); - if ( kasciistricmp( mimeType, "message/rfc822" ) != 0 ) // != message/rfc822 - outsideRfc822 = true; - // don't add the detached signature as attachment when forwarding a - // PGP/MIME signed message inline - if( outsideRfc822 && - kasciistricmp( mimeType, "application/pgp-signature" ) != 0 ) { // != application/pgp-signature - if (i > 0 || kasciistricmp(msgPart.typeStr(),"text") != 0) - msg->addBodyPart(&msgPart); - } - // avoid kind of recursive attaching of rfc822 parts - if ( kasciistricmp( mimeType, "message/rfc822" ) == 0 ) // == message/rfc822 - outsideRfc822 = false; - } - } -#endif // BROKEN_FOR_OPAQUE_SIGNED_OR_ENCRYPTED_MAILS - - - // setStatus(KMMsgStatusForwarded); msg->link(this, KMMsgStatusForwarded); - return msg; } *** Bug 102151 has been marked as a duplicate of this bug. *** *** Bug 103348 has been marked as a duplicate of this bug. *** *** Bug 104400 has been marked as a duplicate of this bug. *** *** Bug 106150 has been marked as a duplicate of this bug. *** |