Olm file convert to Pst

Dear Support,

Here the multiple snapshot is attached the creation of Mac App(Cocoa App)project. I am a Mac developer and i create a new project in Mac App(Cocoa App) and add the Aspose.Email package. because i also create the user interface in Main.storyboard file than i want to used this line in Mac App(Cocoa App) project.
mapi.SetBodyContent(htmlBody, BodyContentType.Html); generate the System.NotSupportedException.how its possible to resolve this exception in Mac App(Cocoa App) project.
Screen Shot 2018-06-13 at 1.22.00 PM.jpg (84.0 KB)
Screen Shot 2018-06-13 at 1.23.12 PM.png (61.0 KB)
Screen Shot 2018-06-13 at 1.22.42 PM.png (50.8 KB)

@priyankur.chauhan,

Thank you for providing details. My installation of Visual Studio is missing the template for Mac App. I am installing the Mac app template and it may take time. Please spare us little time to configure the environment and test the scenario again. I will write back here as soon as some feedback is ready to share.

@priyankur.chauhan,

I have tried the new installation but could not succeed as still it does not show the template project under Mac. Could you please let us know which version of Visual Studio for Mac are you using like Community version or some Professional version? Please share the link from where this visual studio can be installed containing the project type for Mac. Otherwise if its some separate add on, then provide link for that as well. It is must required to observe the actual problem here and provide assistance accordingly.

Dear Support,

Here the multiple snapshot is attached Which are represent the version(7.4) of Visual Studio For Mac using the Community version.Visual Studio For Mac with Community version link is here:
https://www.visualstudio.com/thank-you-downloading-visual-studio-mac/?sku=communitymac&rel=15#
Screen Shot 2018-06-14 at 8.08.30 AM.jpg (63.2 KB)
Screen Shot 2018-06-14 at 8.08.51 AM.png (72.2 KB)
Screen Shot 2018-06-14 at 10.49.04 AM.png (78.5 KB)

@priyankur.chauhan,

We are working over this query and will soon share our findings with you here.

@priyankur.chauhan,

The issue has been logged as EMAILNET-39030 for further investigation at our end. We’ll update you here with our findings as some update is available in this regard.

@priyankur.chauhan,

Please set your build settings as shown in the attached screenshot to avoid this problem.C_Users_vit_AppData_Local_Packages_Microsoft.SkypeApp_kzf8qxf38zg5c_LocalState_76e9c444-5104-4570-83ba-b5fb5794938e.jpg (88.8 KB)

Thankyou support it was helpfull for me.

Dear support,

How to write Contacts, Calendar, Tasks and Notes data in created pst file.because the olm file has Mails, Contacts, Calendar, Tasks and Notes.how is possible in the created pst file.

@priyankur.chauhan,

You may please follow the links below which provide detailed information about writing contacts, calendar, tasks and notes in PST.

  1. Contacts

  2. Tasks

  3. Notes

  4. Calendar

Dear support,

I used your given sample code

public static void Test()
{
DataTable table = GetTable();
File.Delete(“output.pst”);
PersonalStorage pst = PersonalStorage.Create(“output.pst”, FileFormatVersion.Unicode);
FolderInfo info = pst.CreatePredefinedFolder(“Inbox”, StandardIpmFolder.Inbox);
for (int i = 0; i < table.Rows.Count; i++)
{
MapiMessage mapi = new MapiMessage(
"from@gmail.com",
table.Rows[i][“To”].ToString(),
table.Rows[i][“Subject”].ToString(),
table.Rows[i][“MsgBody”].ToString()
);
mapi.Recipients.Add(table.Rows[i][“CCAddress”].ToString(), table.Rows[i][“CCDisplayName”].ToString(), MapiRecipientType.MAPI_CC);
mapi.Attachments.Add(table.Rows[i][“AttachmentName”].ToString(), table.Rows[i][“AttachmentData”] as Byte[]);
info.AddMessage(mapi);
}
pst.Dispose();
}
public static DataTable GetTable()
{
DataTable table = new DataTable();
table.Columns.Add(“Subject”, typeof(string));
table.Columns.Add(“To”, typeof(string));
table.Columns.Add(“MsgBody”, typeof(string));
table.Columns.Add(“CCDisplayName”, typeof(string));
table.Columns.Add(“CCAddress”, typeof(string));
table.Columns.Add(“AttachmentName”, typeof(string));
table.Columns.Add(“AttachmentData”, typeof(Byte[]));

// Here we add five DataRows.
table.Rows.Add("Subject 1", "to1@gmail.com", "Message Body 1", "CC1", "CC1@gmail.com", "att1.txt", Encoding.ASCII.GetBytes("Data in att1 file"));
table.Rows.Add("Subject 2", "to2@gmail.com", "Message Body 2", "CC2", "CC2@gmail.com", "att2.txt", Encoding.ASCII.GetBytes("Data in att2 file"));
table.Rows.Add("Subject 3", "to3@gmail.com", "Message Body 3", "CC3", "CC3@gmail.com", "att3.txt", Encoding.ASCII.GetBytes("Data in att3 file"));
table.Rows.Add("Subject 4", "to4@gmail.com", "Message Body 4", "CC4", "CC4@gmail.com", "att4.txt", Encoding.ASCII.GetBytes("Data in att4 file"));
table.Rows.Add("Subject 5", "to5@gmail.com", "Message Body 5", "CC5", "CC5@gmail.com", "att5.txt", Encoding.ASCII.GetBytes("Data in att5 file"));
return table;

}

I want to know how to write the own date and time for mail in pst file.currently your given sample code write present date and time.how is possible to write own date and time in pst file.

@priyankur.chauhan,

Please use the following code sample to set any date time of your choice for these fields. These are for MapiCalendar but you can use any type of Mapi object for setting properties against this code.

private static byte [] convertDateTime(DateTime t)
{
    long filetime = t.toFileTime();
    byte[] d = new byte[8];
    d[0] = (byte)(filetime & 0xFF);
    d[1] = (byte)((filetime & 0xFF00) >> 8);
    d[2] = (byte)((filetime & 0xFF0000) >> 16);
    d[3] = (byte)((filetime & 0xFF000000) >> 24);
    d[4] = (byte)((filetime & 0xFF00000000l) >> 32);
    d[5] = (byte)((filetime & 0xFF0000000000l) >> 40);
    d[6] = (byte)((filetime & 0xFF000000000000l) >> 48);
    d[7] = (byte)((filetime & 0xFF00000000000000l) >> 56);
    return d;
}
private static void testEmail3()
{
    MapiCalendar cal = new MapiCalendar();
    MapiProperty property = new MapiProperty(MapiPropertyTag.PR_CREATION_TIME, convertDateTime(new DateTime(2018, 1, 1)));
    cal.setProperty(property);
    property = new MapiProperty(MapiPropertyTag.PR_RECEIPT_TIME, convertDateTime(new DateTime(2018, 1, 1)));
    cal.setProperty(property);
    property = new MapiProperty(MapiPropertyTag.PR_DELIVER_TIME, convertDateTime(new DateTime(2018, 1, 1)));
    cal.setProperty(property);
}

Dear support,

I used your given sample code

PersonalStorage pst = PersonalStorage.Create("/private/var/root/Desktop/New/Otput.pst", FileFormatVersion.Unicode);
FolderInfo notesFolder = pst.CreatePredefinedFolder(“Notes”, StandardIpmFolder.Notes);
MapiNote note = new MapiNote();
note.Subject = “New note”;
note.Body = “Body Type note”;
note.Color = NoteColor.Pink;
MapiProperty property = new MapiProperty(MapiPropertyTag.PR_CREATION_TIME, convertDateTime(new DateTime(2018, 1, 1)));
note.SetProperty(property);
notesFolder.AddMapiMessageItem(note);

For writing the date and time in pst but the created pst is import in outlook 2016 but does not show the preview of notes such as Subject, Body, Date and time. how is possible to write own date and time in Mails, Notes,Tasks, Calendar, Contacts and how to get Date & Time & Day Name using convertDateTime function.
One more question is how to write notes html body in created pst.

@priyankur.chauhan,

Where are you checking the preview of generated note file? Please elaborate with the help of a screenshot that we can follow to check the preview of such items added to PST.

PS: Please create a new thread and share your exact problem along with your sample code in that thread. We request you to please use one thread for one reporting one issue to keep matters clean and easy to follow. This thread has already 32 posts which is making it difficult for us to follow the actual issue when the post title is about OLM to PST file format. We appreciate your understanding in this regard.