Hi,
If I create a Mapi Task without the Start And End date and try to send that task to a user then it stop working. but code is being executed successfully. please see the below code.
In Outlook we can create a Task without start and end date.
MapiTask task = new MapiTask();
task.Subject=“Aspose Task Test”;
task.Body=“Test Body”;
task.PercentComplete = claimTask.PercentComplete;
task.EstimatedEffort = 2000;
task.ActualEffort = 20;
task.History = MapiTaskHistory.Assigned;
task.LastUpdate = DateTime.Now;
task.Users.Owner = claimTask.Owner;
MemoryStream ms = new MemoryStream();
task.Save(ms, TaskSaveFormat.Msg);
ms.Position = 0;
// 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 = "abc@domain.com";
eml.To.Clear();
eml.To.Add(new Aspose.Email.Mail.MailAddress("xyz@domain.com"));
eml.Body=“Task has been completed”;
SmtpClient smtpClient = new SmtpClient(“[mail.domain.com](http://mail.domain.com/)”);
smtpClient.UseTnef = true;
smtpClient.Send(eml);
Please assist me on the same as soon as possible.
Thanks in advance,
Vipin Panwar