Index: kmail/kmkernel.cpp
===================================================================
--- kmail/kmkernel.cpp	(revision 660685)
+++ kmail/kmkernel.cpp	(working copy)
@@ -523,7 +523,9 @@
       msgPart->setTypeStr( attachType );
       msgPart->setSubtypeStr( attachSubType );
       msgPart->setParameter( attachParamAttr, attachParamValue );
-      msgPart->setContentDisposition( attachContDisp );
+      if( ! GlobalSettings::self()->exchangeCompatibleAttachments() ) {
+        msgPart->setContentDisposition( attachContDisp );
+      }
       if( !attachCharset.isEmpty() ) {
         // kdDebug(5006) << "KMKernel::openComposer set attachCharset to "
         // << attachCharset << endl;
Index: kmail/kmail.kcfg
===================================================================
--- kmail/kmail.kcfg	(revision 660685)
+++ kmail/kmail.kcfg	(working copy)
@@ -163,6 +163,13 @@
         <default>false</default>
       </entry>
 
+     <entry name="ExchangeCompatibleAttachments" type="Bool">
+        <label>Exchange compatible attachment naming</label>
+        <whatsthis>Microsoft Outlook, when used in combination with a Microsoft Exchange server, has a problem understanding
+standards-compliant groupware e-mail. Turn this option on send groupware attachments in a way that Microsoft Exchange understands.</whatsthis>
+        <default>false</default>
+      </entry>
+
       <entry name="AutomaticSending" type="Bool">
         <label>Automatic invitation sending</label>
         <whatsthis>When this is checked, you will not see the mail composer window. Instead, all invitation mails are sent automatically. If you want to see the mail before sending it, you can uncheck this option. However, be aware that the text in the composer window is in iCalendar syntax, and you should not try modifying it by hand.</whatsthis>
Index: kmail/callback.cpp
===================================================================
--- kmail/callback.cpp	(revision 660685)
+++ kmail/callback.cpp	(working copy)
@@ -33,6 +33,7 @@
 #include "callback.h"
 #include "kmkernel.h"
 #include "kmmessage.h"
+#include "kmmsgpart.h"
 #include <libemailfunctions/email.h>
 #include <libkpimidentities/identity.h>
 #include <libkpimidentities/identitymanager.h>
@@ -62,11 +63,8 @@
 
   KMMessage *msg = new KMMessage;
   msg->initHeader();
-  msg->setHeaderField( "Content-Type",
-                       "text/calendar; method=reply; charset=\"utf-8\"" );
   msg->setSubject( subject );
   msg->setTo( to );
-  msg->setBody( iCal.utf8() );
   msg->setFrom( receiver() );
   /* We want the triggering mail to be moved to the trash once this one
    * has been sent successfully. Set a link header which accomplishes that. */
@@ -79,12 +77,13 @@
     // Try and match the receiver with an identity
     const KPIM::Identity& identity =
       kmkernel->identityManager()->identityForAddress( receiver() );
-    if( identity != KPIM::Identity::null() )
+    if( identity != KPIM::Identity::null() ) {
       // Identity found. Use this
       msg->setFrom( identity.fullEmailAddr() );
       msg->setHeaderField("X-KMail-Identity", QString::number( identity.uoid() ));
       // Remove BCC from identity on ical invitations (https://intevation.de/roundup/kolab/issue474)
       msg->setBcc( "" );
+    }
   }
 
   KMail::Composer * cWin = KMail::makeComposer();
@@ -93,6 +92,24 @@
   cWin->slotWordWrapToggled( false );
   cWin->setSigningAndEncryptionDisabled( true );
 
+  if( GlobalSettings::self()->exchangeCompatibleAttachments() ) {
+    // For Exchange, send ical as attachment, with proper
+    // parameters
+    msg->setCharset( "utf-8" );
+    KMMessagePart *msgPart = new KMMessagePart;
+    msgPart->setName( "cal.ics" );
+    // msgPart->setCteStr( attachCte ); // "base64" ?
+    msgPart->setBodyEncoded( iCal.utf8() );
+    msgPart->setTypeStr( "text" );
+    msgPart->setSubtypeStr( "calendar" );
+    msgPart->setParameter( "method", "reply" );
+    cWin->addAttach( msgPart );
+  } else {
+    msg->setHeaderField( "Content-Type",
+                         "text/calendar; method=reply; charset=\"utf-8\"" );
+    msg->setBody( iCal.utf8() );
+  }
+
   if ( options.readBoolEntry( "AutomaticSending", true ) ) {
     cWin->setAutoDeleteWindow(  true );
     cWin->slotSendNow();
Index: korganizer/komailclient.cpp
===================================================================
--- korganizer/komailclient.cpp	(revision 660685)
+++ korganizer/komailclient.cpp	(working copy)
@@ -197,7 +197,7 @@
       if (idx>=0) {
         idx = attachment.find(':',idx)+1;
         meth = attachment.mid(idx,attachment.find('\n',idx)-idx);
-        meth = meth.lower();
+        meth = meth.lower().stripWhiteSpace();
       } else {
         meth = "publish";
       }