ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp
changeset 62 a8c646b56683
parent 56 15bc1d5d6267
child 76 38bf5461e270
--- a/ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp	Thu Aug 05 21:09:09 2010 +0300
+++ b/ipsservices/ipssosplugin/src/ipsplgmsgmapper.cpp	Mon Aug 23 23:32:31 2010 +0300
@@ -942,17 +942,24 @@
 // ---------------------------------------------------------------------------
 // <cmail>
 TInt CIpsPlgMsgMapper::ConvertBodyPartMimeType(
-    const TUid& aEntryType,
+    const TMsvEmailEntry& aEntry,
     TDes& aMimeType )
     {
     FUNC_LOG;
     TInt result( KErrNone );
 
-    switch ( aEntryType.iUid )
+    switch ( aEntry.iType.iUid )
     {
     case KUidMsvEmailTextEntryValue:
         {
+        if( aEntry.ICalendar() )
+            {
+            aMimeType.Append( KFSMailContentTypeTextCalendar );
+            }
+        else
+            {
             aMimeType.Append( KMimeTypeTextPlain );
+            }
         break;
         }
     case KUidMsvEmailHtmlEntryValue:
@@ -1164,11 +1171,11 @@
     FUNC_LOG;
     CFSMailMessagePart* result( NULL );
     TInt status;
-// <cmail>
     HBufC* buf = HBufC::NewLC( KMaxContentTypeLength );
     TPtr contentType = buf->Des();
 
-    status = ConvertBodyPartMimeType( aEntry.iType, contentType );
+    status = ConvertBodyPartMimeType( aEntry, contentType );
+    
     __ASSERT_DEBUG( ( status == KErrNone ),
         User::Panic( KIpsPlgPanicCategory, EIpsPlgInvalidEntry ) );
     if ( status == KErrNone )
@@ -1181,7 +1188,6 @@
             {
             GetCharsetParameterL( aEntry, contentType );
             }
-// </cmail>
         result->SetContentType( contentType );
         result->SetMailBoxId( aMailBoxId );