Author |
|
daarkarcher Newbie
Joined: 17 September 2019
Online Status: Offline Posts: 6
|
Posted: 17 September 2019 at 4:16am | IP Logged
|
|
|
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 |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6110
|
Posted: 17 September 2019 at 4:21am | IP Logged
|
|
|
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 |
|
|
daarkarcher Newbie
Joined: 17 September 2019
Online Status: Offline Posts: 6
|
Posted: 17 September 2019 at 6:36am | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 17 September 2019 at 7:21am | IP Logged
|
|
|
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 |
|
|
daarkarcher Newbie
Joined: 17 September 2019
Online Status: Offline Posts: 6
|
Posted: 17 September 2019 at 7:26am | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 17 September 2019 at 7:28am | IP Logged
|
|
|
Did you set both (Plain and Html)? I mean setting just Plain.
Regards,
Alex
|
Back to Top |
|
|
daarkarcher Newbie
Joined: 17 September 2019
Online Status: Offline Posts: 6
|
Posted: 17 September 2019 at 8:09am | IP Logged
|
|
|
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 |
|
|
daarkarcher Newbie
Joined: 17 September 2019
Online Status: Offline Posts: 6
|
Posted: 17 September 2019 at 8:17am | IP Logged
|
|
|
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 |
|
|
Alex AfterLogic Support
Joined: 19 November 2003
Online Status: Offline Posts: 2206
|
Posted: 18 September 2019 at 1:16am | IP Logged
|
|
|
What if HtmlToRtfMethod is set to None?
Regards,
Alex
|
Back to Top |
|
|
daarkarcher Newbie
Joined: 17 September 2019
Online Status: Offline Posts: 6
|
Posted: 18 September 2019 at 5:18am | IP Logged
|
|
|
That worked! Thank you Alex
|
Back to Top |
|
|