Aspose.Email for .NET 20.11.0
I need to create MapiJournal in pst, but I found that it only seems to display plain text, and parallel line breaks are also lost. I tried the following ways to set the body, but the problem still exists
testM.SetProperty(KnownPropertyList.RtfCompressed, value)
testM.SetBodyContent(ValueTuple,BodyContentType.Rtf)
testM.BodyRtf = value
testM.SetBodyRtf(value, true);
Please check the screenshot p1.png
p1.png (39.5 KB)
Some other tests:
public static void TestRtf()
{
using (var sp = PersonalStorage.Create(Path.Combine(Desktop, "tempPath", $"{DateTime.UtcNow.Ticks}.pst"), FileFormatVersion.Unicode))
{
var folder = sp.CreatePredefinedFolder("myFolder", StandardIpmFolder.Journal);
using (var testM = MapiMessage.FromFile(Path.Combine(Desktop, "123.msg")))
{
//folder.AddMessage(testM);
var m = (MapiJournal)testM.ToMapiMessageItem();
folder.AddMapiMessageItem(m);
}
}
}
123.zip (7.2 KB)
I dragged out a journal type item from Outlook and used MapiMessage.FromFile to read it. If I use the Addmessage method directly, then its body can be displayed normally, and the problem can be reproduced if AddMapiMessageItem after ToMapiMessageItem().
The Mapicontact type does not seem to have this problem. I look forward to a way to solve the problem on MapiJournal.
Thanks