Mailing List Archive

[issue228] KMail composer: disabling signing for an attachment leads to no body sent
New submission from David Faure <faure@kde.org>:

In KMail, compose a new mail, and
* choose OpenPGP/MIME
* activate signing in the toolbar
* write some text in the body
* add an attachment
* disable signing for that attachment
* send the mail (to yourself)

The resulting mail has no body at all, only the attachment.

The difference with the normal case is:
mEarlyAddAttachments=false and mAllAttachmentsAreInBody=false
(they are true when signing the attachment)

Hmm, not sure if related, but the code basically does
if ( mEarlyAddAttachments ) {
...
} else { // !earlyAddAttachments
// the signed body must not be 8bit encoded
mOldBodyPart.setBodyAndGuessCte(body, allowedCTEs, ..., doSign);
}
// create S/MIME body part for signing and/or encrypting
mOldBodyPart.setBodyEncoded( body );

Doesn't the last line invalidate the contents of the "else"?

Anyway the problem is later, since mEncodedBody is OK.

Further investigation shows that
the && ( !mEarlyAddAttachments || !mAllAttachmentsAreInBody )
in MessageComposer::addBodyAndAttachments() is the first problem (those are
false, but there *is* an attachment in this mail, so we need to go in the first
part of this if() AFAICS). But even commenting that out doesn't help, still no
body in the resulting mail. The Dw* stuff totally escapes me so I'm stopping
there...

----------
assignedto: marc
messages: 1145
nosy: david, marc
priority: bug
status: unread
title: KMail composer: disabling signing for an attachment leads to no body sent
topic: KMail
______________________________________________________
Aegypten issue tracker <aegypten-issues@intevation.de>
<https://intevation.de/roundup/aegypten/issue228>
______________________________________________________