Bug 145091 - problems accepting outlook invitation
Summary: problems accepting outlook invitation
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-05 23:42 UTC by Thorsten Staerk
Modified: 2007-05-08 22:41 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 Thorsten Staerk 2007-05-05 23:42:35 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
OS:                Linux

When I accept outlook invitations, the receiver of my note of acceptance does not get a subject saying if I declined or accepted.
Comment 1 Thorsten Staerk 2007-05-05 23:44:01 UTC
the following patch resolves this problem:

Index: kmail/callback.h
===================================================================
--- kmail/callback.h    (revision 661416)
+++ kmail/callback.h    (working copy)
@@ -57,7 +57,7 @@

   /** Mail a message */
   bool mailICal( const QString& to, const QString iCal,
-                 const QString& subject ) const;
+                 const QString& subject, int reply ) const;

   /** Get the receiver of the mail */
   QString receiver() const;
Index: kmail/callback.cpp
===================================================================
--- kmail/callback.cpp  (revision 661416)
+++ kmail/callback.cpp  (working copy)
@@ -57,13 +57,14 @@
 }

 bool Callback::mailICal( const QString& to, const QString iCal,
-                         const QString& subject ) const
+                         const QString& subject, int reply ) const
 {
   kdDebug(5006) << "Mailing message:\n" << iCal << endl;

   KMMessage *msg = new KMMessage;
   msg->initHeader();
   msg->setSubject( subject );
+  if (reply == 5) msg->setSubject("The sender has accepted the invitation");
   msg->setTo( to );
   msg->setFrom( receiver() );
   /* We want the triggering mail to be moved to the trash once this one
Index: plugins/kmail/bodypartformatter/text_calendar.cpp
===================================================================
--- plugins/kmail/bodypartformatter/text_calendar.cpp   (revision 661416)
+++ plugins/kmail/bodypartformatter/text_calendar.cpp   (working copy)
@@ -223,12 +223,13 @@
       format.setTimeZone( KPimPrefs::timezone(), false );
       QString msg = format.createScheduleMessage( incidence,
                                                   Scheduler::Reply );
+      kdDebug() << "scheduler::REPly=" << Scheduler::Reply << endl;
       QString subject;
       if ( !incidence->summary().isEmpty() )
         subject = i18n( "Answer: %1" ).arg( incidence->summary() );
       else
         subject = i18n( "Answer: Incidence with no summary" );
-      return callback.mailICal( incidence->organizer().fullName(), msg, subject );
+      return callback.mailICal( incidence->organizer().fullName(), msg, subject, Scheduler::Reply );
     }

     bool saveFile( const QString& receiver, const QString& iCal,
Comment 2 Thomas McGuire 2007-05-07 17:55:14 UTC
Isn't this committed to 3.5 branch and trunk by now or was that a different thing? (commit 661525/661635 and 661734)
Comment 3 Allen Winter 2007-05-07 18:09:40 UTC
This should be fixed now.
We are still discussing if
1) we should merge a couple of Outlook+Exchange configuration options into 1 option ("play nice with Outlook+Exchange")
2) if Exchange Compatible Invitations should be set as a default.

But, as is, this bug is fixes according to tstaerk's needs.
Comment 4 Thorsten Staerk 2007-05-08 11:11:00 UTC
The answer tells the meeting organizer two things:
[Accepted|Declined|Tentative]: [<Meeting subject>]

kmail should do the same subject into the acceptance mail.
Comment 5 Thorsten Staerk 2007-05-08 22:41:14 UTC
SVN commit 662660 by tstaerk:

give original style answers about meeting attendance
BUGS:145091


 M  +4 -1      callback.cpp  
 M  +1 -1      callback.h  


--- branches/KDE/3.5/kdepim/kmail/callback.cpp #662659:662660
@@ -63,7 +63,10 @@
   KMMessage *msg = new KMMessage;
   msg->initHeader();
   if ( GlobalSettings::self()->exchangeCompatibleInvitations() ) {
-    msg->setSubject( status );
+    if ( status == QString("cancel") ) msg->setSubject( QString("Declined: %1").arg(subject).replace("Answer: ","") );
+    else if ( status == QString("tentative") ) msg->setSubject(QString("Tentative: %1").arg(subject).replace("Answer: ","") );
+    else if ( status == QString("accepted") ) msg->setSubject( QString("Accepted: %1").arg(subject).replace("Answer: ","") );
+    else msg->setSubject( subject );
   } else {
     msg->setSubject( subject );
   }
--- branches/KDE/3.5/kdepim/kmail/callback.h #662659:662660
@@ -56,7 +56,7 @@
   KMMessage* getMsg() const { return mMsg; }
 
   /** Mail a message
-   * @ param status can be accepted/declined/tentative
+   * @ param status can be accepted/cancel/tentative
    */
   bool mailICal( const QString& to, const QString iCal,
                  const QString& subject, const QString &status ) const;