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

Free Support Forum - aspose.com

Sending Task

Hi


In our process,we assign tasks to our users using MS Outlook. As we are replacing Outlook with your API, we want to know if this will be possible with this API?

Hi Leo,

Yes, you can achieve this using Aspose.Email API. You can load the Task MSG file using MapiMessage.FromFile method and then convert it to EML using the ToMailMessage method. Please have a look at the following code sample for your kind reference and let us know if you need any further assistance in this regard.

Sample Code:

MapiMessage task = MapiMessage.FromFile(“sometask.msg”);

var options = new MailConversionOptions();

options.ConvertAsTnef = true;

MailMessage eml = task.ToMailMessage(options);

SmtpClient client = new SmtpClient(“[host.domain.com](http://host.domain.com/)”, 587, “username”, “password”);

client.Send(eml);