Sign UpSign Up   Sign InSign In Welcome Guest,
Live Chat Live Chat

Saving Calendar Items

Last post 07-01-2009, 10:32 AM by tier3. 6 replies.
Sort Posts: Previous Next
  •  06-24-2009, 10:36 AM 185309

    Saving Calendar Items .NET

    Hello,

    I've been tasked with exporting items from exchange to .msg format.  This is currently working fine for messages in the inbox.  However, when I attempt to save messages in the calendar, I get the following error:

          The MIME transfer encoding 'EightBit' is not supported.

    This error is thrown when executing this code:

          MailMessage MailMessageRef = ExchangeClientRef.FetchMessage(MessageURI);

          MailMessageRef.Save(CalendarOutputDirectory + OutputFileName, MessageFormat.Msg);

    This code does work:

          ExchangeClientRef.SaveMessage(MessageURI, CalendarOutputDirectory + OutputFileName);

    Am I missing something simple? 

    Thanks

     
  •  06-26-2009, 4:25 AM 185581 in reply to 185309

    Re: Saving Calendar Items .NET

    Hi,

    Thanks for considering Aspose.

    The ExchangeClient does not support saving messages from the Calendar yet. We will consider adding this feature in future.

    Regarding the statement below:

    This code does work:

          ExchangeClientRef.SaveMessage(MessageURI, CalendarOutputDirectory + OutputFileName);

    If the msg is saved, could you please post here for our analysis?


    Best Regards,
    Saqib Razzaq
    Support Developer, Aspose Sialkot Team
    http://www.aspose.com
    Your File Format Experts
     
  •  06-29-2009, 11:23 AM 185904 in reply to 185581

    Re: Saving Calendar Items

    When I had mentioned that this code worked, I did forget to specify that it was saving it to a .eml file.  As far as I know, when you execute .SaveMessage, it only allows you to save to .eml.
     
  •  06-29-2009, 2:14 PM 185929 in reply to 185904

    Re: Saving Calendar Items .NET

    Hi,

    You can also save as .msg by calling overloaded method MailMessage.Save(file, MessageFormat.Msg).


    Best Regards,
    Saqib Razzaq
    Support Developer, Aspose Sialkot Team
    http://www.aspose.com
    Your File Format Experts
     
  •  06-30-2009, 6:00 PM 186237 in reply to 185929

    Re: Saving Calendar Items

    That is correct.  But, as you can see in the code example:

          MailMessage MailMessageRef = ExchangeClientRef.FetchMessage(MessageURI);

          MailMessageRef.Save(CalendarOutputDirectory + OutputFileName, MessageFormat.Msg);

    Before I can call MailMessage.Save, I need to fetch the message first.  This is where the original failure exists.  Is there another way to get the MailMessage?

     
  •  07-01-2009, 9:08 AM 186400 in reply to 186237

    Re: Saving Calendar Items .NET

    Hi,

    You can directly save messages from Exchange Server, if you know the MessageURI. Please see the details at http://www.aspose.com/documentation/file-format-components/aspose.network-for-.net/saving-messages-from-exchange-server-mailbox-in-eml-and-msg-format.html. But, by this method, you can save as eml file only. Your sample code is the correct way to save as msg file.

    Does it fail for the Inbox folder emails or Calendar items?


    Best Regards,
    Saqib Razzaq
    Support Developer, Aspose Sialkot Team
    http://www.aspose.com
    Your File Format Experts
     
  •  07-01-2009, 10:32 AM 186417 in reply to 186400

    Re: Saving Calendar Items

    The .FetchMessage method works fine for inbox items.  It fails for calendar items. 

    Saving calendar items to .eml file does work when calling MailMessage.Save.  Saving calendar items to .msg fails because .FetchMessage returns the error from the begging of this thread.

     
View as RSS news feed in XML