I was going to try to load up an ExchangeTask from disk, and I started to use this bit of code:
ExchangeTask exchangeTask=ExchangeTask. //Exchange Task has no method to load from stream
Is there a way to automatically load/populate data into this class somehow?
Thank you.
Hi Sevag,
Thank you for writing to Aspose support team.
The ExchangeTask class provides the capability to create, update and delete tasks on the Exchange server as can be followed from this article, which is specifically for working with Tasks on Exchange server. If you wan to load a task from disc, you need to load it using the MapiTask class object. Please refer to our documentation article Creating, Saving and Reading Outlook Task and let us know if we can be of any additional help to you in this regard.
Thank you for your response.
What if I want to load a task from disk and send it to Exchange? Is there any way to convert MapiTask to ExchangeTask so that we can send the task to Exchange?
Hi Sevag,
Hi Sevag,
You can also use the InterpretAsTnef method to load and send a MapiTask from disc. Please try the following sample code and let us know if we can be of any additional help to you in this regard.
Sample Code:
// load task from MSG file (or stream)
MapiMessage msg = MapiMessage.FromFile(“Task.msg”);
// Convert to TNEF eml. Such a feature would allow to send messages by mail clients,
// where the information, specific for Outlook task, would be stored.
MailMessageInterpretor mi = MailMessageInterpretorFactory.Instance.GetIntepretor(msg.MessageClass);
MailMessage eml = mi.InterpretAsTnef(msg);
eml.From = “fromAddress”;
eml.To.Clear();
eml.To.Add(new Aspose.Email.Mail.MailAddress(“toAddress”));
// Create instance of EWSClient class by giving credentials
IEWSClient client = EWSClient.GetEWSClient(“https:[//outlook.office365.com/ews/exchange.asmx](https://outlook.office365.com/ews/exchange.asmx)”, “testUser”, “pwd”, “domain”);
// Send the task
client.Send(eml);
The issues you have found earlier (filed as NETWORKNET-34271) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Aspose Notifier.