I have a problem when creating a MAPIMessage object from a MailMessage object using the MAPIMessage.FromMailMessage(mailmessage) method.
If the MailMessage object's body is in RTF format I get a strange result after creating the MAPIMessage. The MAPIMessage object's Body property is always:
Hello,
This is a test.
-kyle
Could you explain this or help me fix it please?
regards,
Robert
Hi Robert,
Could you please specify how you created the origional MailMessage? If you create it from a file, could you please attach this message file so that we could check it?
Thanks,
Hello,
I retrieved a list messages from an exchange mailbox using:
Exchange.ExchangeClient xClient = new ExchangeClient(mailboxUri, credentials);
Exchange.ExchangeMailboxInfo xMailbox = xClient.GetMailboxInfo();
Exchange.ExchangeMessageInfoCollection xMessages =
xClient.ListMessages(xMailbox.InboxUri);
A message is selected from the collection and the UniqueURI is passed to the next method.
Mail.MailMessage emlMsg = xClient.FetchMessage(messageUri);
Outlook.MapiMessage msg = Outlook.MapiMessage.FromMailMessage(emlMsg);
It is after this code has executed that the body property of the Outlook.MapiMessage object is set to "Hello, this is a test, -kyle".
regards,
Robert
Hi Robert,
Please check attached hotfix. This should solve the problem.