Bug 354165 - Append filename suffix ".eml" to encapsulated emails...
Summary: Append filename suffix ".eml" to encapsulated emails...
Status: REPORTED
Alias: None
Product: kdepim
Classification: Applications
Component: messagecomposer (show other bugs)
Version: unspecified
Platform: FreeBSD Ports FreeBSD
: NOR wishlist
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-21 09:50 UTC by Nils Beyer
Modified: 2015-10-21 09:50 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nils Beyer 2015-10-21 09:50:10 UTC
We have a brain-dead document archiving system (proprietary ) that scans for encapsulated mails only by their filename suffixes and not the MIME-Content-Type. Could you please add a suffix ".eml" to the filename of the encapsulated mails? It should be only a cosmetical change to others.

Here is my diff:

--- messagecomposer/helper/messagefactory.cpp.orig      2015-10-21 10:45:44.445463841 +0200
+++ messagecomposer/helper/messagefactory.cpp   2015-10-21 09:59:09.424655012 +0200
@@ -448,7 +448,7 @@
     KMime::Content *msgPart = new KMime::Content( fwdMsg.get() );
     msgPart->contentType()->setMimeType( "message/rfc822" );
 
-    msgPart->contentDisposition()->setParameter( QLatin1String( "filename" ), i18n( "forwarded message" ) );
+    msgPart->contentDisposition()->setParameter( QLatin1String( "filename" ), i18n( "forwarded message.eml" ) );
     msgPart->contentDisposition()->setDisposition( KMime::Headers::CDinline );
     msgPart->contentDescription()->fromUnicodeString( fwdMsg->from()->asUnicodeString() + QLatin1String( ": " ) + fwdMsg->subject()->asUnicodeString(), "utf-8" );
     msgPart->setBody( fwdMsg->encodedContent() );
@@ -736,7 +736,7 @@
         part->contentType()->setCharset( fMsg->contentType()->charset() );
         part->contentID()->setIdentifier( fMsg->contentID()->identifier() );
         part->contentDescription()->fromUnicodeString( fMsg->contentDescription()->asUnicodeString(), "utf8" );
-        part->contentDisposition()->setParameter( QLatin1String( "name" ), i18n( "forwarded message" ) );
+        part->contentDisposition()->setParameter( QLatin1String( "name" ), i18n( "forwarded message.eml" ) );
         part->fromUnicodeString( QString::fromLatin1( fMsg->encodedContent() ) );
         part->assemble();
         MessageCore::Util::addLinkInformation( msg, item.id(), Akonadi::MessageStatus::statusForwarded() );

Reproducible: Always

Steps to Reproduce:
1. Open KMail (having an existing mail account)
2. Forward any mail as attachment so it gets encapsulated


Actual Results:  
Filename of the encapsulated mail is "forwarded message".

Expected Results:  
Filename of the encapsulated mail is "forwarded message.eml".