I am attempting to add a message to the drafts folder in a PST.
The Aspose.Email.Outlook.Pst.FolderInfo.AddMessage() method throws the exception "Impossible to perform the operation.“
Code:
Dim Pst As Aspose.Email.Outlook.Pst.PersonalStorage = Aspose.Email.Outlook.Pst.PersonalStorage.FromFile(“C:\Users\hilimirew\Desktop\Outlook_OLD4.pst”)
Dim Drafts As Aspose.Email.Outlook.Pst.FolderInfo = Pst.RootFolder.GetSubFolder(“Drafts”)
Dim Msg As New Aspose.Email.Outlook.MapiMessage()
Msg.Recipients.Add("test@nowhere.com”, “Test”, Aspose.Email.Outlook.MapiRecipientType.Unknown)
'Msg.Attachments.Add(“Notice re increase in payment percentage as of November 5 2014.pdf”, IO.File.ReadAllBytes(“C:\Users\hilimirew\Desktop\Notice re increase in payment percentage as of November 5 2014.pdf”))
Msg.Subject = “test”
Msg.Body = “xyz”
Stop
Drafts.AddMessage(Msg)
MsgBox(“Done”)