Search The ForumSearch   RegisterRegister  LoginLogin

MailBee.NET Objects

 AfterLogic Forum : MailBee.NET Objects
Subject Topic: Cannot preview body of MailBee msg Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
daarkarcher
Newbie
Newbie


Joined: 17 September 2019
Online Status: Offline
Posts: 6
Posted: 17 September 2019 at 4:16am | IP Logged Quote daarkarcher

Hi,

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 View daarkarcher's Profile Search for other posts by daarkarcher
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 5703
Posted: 17 September 2019 at 4:21am | IP Logged Quote Igor

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.

--
Regards,
Igor, Afterlogic Support
Back to Top View Igor's Profile Search for other posts by Igor
 
daarkarcher
Newbie
Newbie


Joined: 17 September 2019
Online Status: Offline
Posts: 6
Posted: 17 September 2019 at 6:36am | IP Logged Quote daarkarcher

Thank you Igor.

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 View daarkarcher's Profile Search for other posts by daarkarcher
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2157
Posted: 17 September 2019 at 7:21am | IP Logged Quote Alex

So it's not that the message doesn't have body, it's that SharePoint doesn't see it?

Did you try plain-text body? BodyPlainText, I mean.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
daarkarcher
Newbie
Newbie


Joined: 17 September 2019
Online Status: Offline
Posts: 6
Posted: 17 September 2019 at 7:26am | IP Logged Quote daarkarcher

Yes that is correct Alex.

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 View daarkarcher's Profile Search for other posts by daarkarcher
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2157
Posted: 17 September 2019 at 7:28am | IP Logged Quote Alex

Did you set both (Plain and Html)? I mean setting just Plain.

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
daarkarcher
Newbie
Newbie


Joined: 17 September 2019
Online Status: Offline
Posts: 6
Posted: 17 September 2019 at 8:09am | IP Logged Quote daarkarcher

Okay setting only the Plain text "kind of" works - the body text is now displayed in sharepoint preview.

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 View daarkarcher's Profile Search for other posts by daarkarcher
 
daarkarcher
Newbie
Newbie


Joined: 17 September 2019
Online Status: Offline
Posts: 6
Posted: 17 September 2019 at 8:17am | IP Logged Quote daarkarcher

Also, just to add - this issue may be specifically a problem in SharePoint online.
I have tried uploading the same email to SharePoint 2010 and it previews fine on there.
Back to Top View daarkarcher's Profile Search for other posts by daarkarcher
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2157
Posted: 18 September 2019 at 1:16am | IP Logged Quote Alex

What if HtmlToRtfMethod is set to None?

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 
daarkarcher
Newbie
Newbie


Joined: 17 September 2019
Online Status: Offline
Posts: 6
Posted: 18 September 2019 at 5:18am | IP Logged Quote daarkarcher

That worked! Thank you Alex
Back to Top View daarkarcher's Profile Search for other posts by daarkarcher
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide