Create a new Task similar to Outlook and send Task via email to assigned user - Urgent

Hi,


I just want to Create/Update/Delete a Task in .Net similar as we create a new Task in Outlook and need to send Task as an email to the assigned user.
Then Task should be shown in the outlook calender under the Tasks and in calender also.
If possible then Task Reminder should also needed similar to TASK in Outlook.

Please assist me for the above that would be really very helpful and if it is possible using Aspose dll then i really love to Aspose API.

Thanks in advance,
Vipin

Contact:
Email ID: vipinchoudhary277@gmail.com
MOB: +91 - 9910086910


Hi Vipin,

Thank you for posting your query.

If you want the Task to be available in Outlook, then you have to do it using the Exchange Client as there is no other way for this to be available otherwise. The ExchangeTask class can be used to initiate such a task and then create it on the Exchange server using the IEWSClient. I would request you to please have a look at our documentation article, Working with Tasks on Exchange Server, for:

  • Creating a Task
  • Updating a Task
  • Adding a Reminder to the task
  • Deleting a task

In order to send a Task as an assignment to a user, you have to load it from disc for sending using the SmtpClient or EWS Client of the API. Please try the code sample below for this purpose and let us know if we can be of any help to you.

Code:

// Create instance of ExchangeClient 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”);

MailMessageLoadOptions loadOptions = new MailMessageLoadOptions();

loadOptions.MessageFormat = MessageFormat.Msg;

loadOptions.FileCompatibilityMode = FileCompatibilityMode.PreserveTnefAttachments;

// load task from .msg file

MailMessage eml = MailMessage.Load(“task.msg”, loadOptions);

eml.From = "firstname.lastname@domain.com";

eml.To.Clear();

eml.To.Add(new Aspose.Email.Mail.MailAddress("firstname.lastname@domain.com"));

client.Send(eml);