We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to Convert a MapiTask into ExchangeTask

How to Convert a MapiTask into ExchangeTask. Please share code for the same.



There is no direct method of converting a MapiTask to ExchangeTask. However, you can send a MapiTask using the API as shown in the following code sample.

Sample Code

MapiMessage msg = MapiMessage.FromFile("mapitask.msg");

MailMessage eml = msg.ToMailMessage(new MailConversionOptions() { ConvertAsTnef = true });  //the tnef flag is necessary

eml.From= "fromAddress";


eml.To.Add(new Aspose.Email.MailAddress("toAddress"));

//Create instance of EWSClient class by giving credentials
IEWSClient client = EWSClient.GetEWSClient("https://outlook.office365.com/ews/exchange.asmx", "testUser", "pwd", "domain");

//Send the task