| Author |  | 
      
        | daarkarcher Newbie
 
  
 
 Joined: 17 September 2019
 Online Status: Offline
 Posts: 6
 | 
          Hi,
           | Posted: 17 September 2019 at 4:16am | IP Logged |   |  
           | 
 |  
 I am looking to get some guidance or direction on an issue I am having with MailBee.NET v10.0.502 please.
 
 I am uploading an email (.msg) to SharePoint online having used the MailMessageToMsg function. The email loads fine into SharePoint, however Iwhen I preview the email, then I cannot view the body, only the email header; such as the To, From and Subject fields.
 
 When I upload a msg file from outlook directly to SharePoint online then this works as expected and I can preview the whole email message.
 
 Has anyone come across this issue? OR could this issue have been fixed in the most recent version of MailBee.Net?
 
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Igor AfterLogic Support
 
  
 
 Joined: 24 June 2008
 Location: United States
 Online Status: Offline
 Posts: 6167
 | 
          We'd recommend to check if the issue persists with the latest version, you can download it and get a compatible trial key here; you can also get just the DLL package.
           | Posted: 17 September 2019 at 4:21am | IP Logged |   |  
           | 
 |  
 --
 Regards,
 Igor, Afterlogic Support
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | daarkarcher Newbie
 
  
 
 Joined: 17 September 2019
 Online Status: Offline
 Posts: 6
 | 
          Thank you Igor.
           | Posted: 17 September 2019 at 6:36am | IP Logged |   |  
           | 
 |  
 I have tried the latest version (12.0.0) with my trial license and I can confirm that the issue still persists.
 
 Here is a simplified chunk of my code:
 
 using (MailBee.Mime.MailMessage msg = new MailBee.Mime.MailMessage())
 {
 msg.To.Add(myEmail.To);
 msg.From.Email = myEmail.From;
 
 if (!string.IsNullOrEmpty(email.Description) && !string.IsNullOrWhiteSpace(email.Description))
 {
 msg.BodyHtmlText = email.Description;
 }
 
 msg.Date = email.ActualEnd.Value.ToLocalTime();
 }
 
 MsgConvert messageConverter = new MsgConvert("###")
 {
 MsgAsUnicode = true,
 HtmlToRtfMethod = HtmlToRtfConversionMethod.Internal,
 MsgAsDraft = false
 };
 
 using (MemoryStream emailMemoryStream = new MemoryStream())
 {
 messageConverter.MailMessageToMsg(msg, emailMemoryStream);
 
 // code to upload to sharepoint here
 }
 
 Can you please advise on this issue?
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          So it's not that the message doesn't have body, it's that SharePoint doesn't see it?
           | Posted: 17 September 2019 at 7:21am | IP Logged |   |  
           | 
 |  
 Did you try plain-text body? BodyPlainText, I mean.
 
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | daarkarcher Newbie
 
  
 
 Joined: 17 September 2019
 Online Status: Offline
 Posts: 6
 | 
          Yes that is correct Alex.
           | Posted: 17 September 2019 at 7:26am | IP Logged |   |  
           | 
 |  
 I have tried setting BodyPlainText as well using MakePlainBodyFromHtmlBody() function, as I noticed that the content type was text/plain. Still the same issue.
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          Did you set both (Plain and Html)? I mean setting just Plain.
           | Posted: 17 September 2019 at 7:28am | IP Logged |   |  
           | 
 |  
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | daarkarcher Newbie
 
  
 
 Joined: 17 September 2019
 Online Status: Offline
 Posts: 6
 | 
          Okay setting only the Plain text "kind of" works - the body text is now displayed in sharepoint preview.
           | Posted: 17 September 2019 at 8:09am | IP Logged |   |  
           | 
 |  
 However all formatting is lost; everything appears on one line and the From value is now missing. Is there a way to make BodyHtmlText work?
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | daarkarcher Newbie
 
  
 
 Joined: 17 September 2019
 Online Status: Offline
 Posts: 6
 | 
          Also, just to add - this issue may be specifically a problem in SharePoint online.
           | Posted: 17 September 2019 at 8:17am | IP Logged |   |  
           | 
 |  I have tried uploading the same email to SharePoint 2010 and it previews fine on there.
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | Alex AfterLogic Support
 
  
  
 Joined: 19 November 2003
 Online Status: Offline
 Posts: 2207
 | 
          What if HtmlToRtfMethod is set to None?
           | Posted: 18 September 2019 at 1:16am | IP Logged |   |  
           | 
 |  
 Regards,
 Alex
 | 
       
        | Back to Top |     | 
       
       
        |  | 
        | daarkarcher Newbie
 
  
 
 Joined: 17 September 2019
 Online Status: Offline
 Posts: 6
 | 
          That worked! Thank you Alex
           | Posted: 18 September 2019 at 5:18am | IP Logged |   |  
           | 
 |  | 
       
        | Back to Top |     | 
       
       
        |  |