Hi Rik,
Thank you for inquiry.
I am sorry, there is no such method or utility for this kind of conversion. Most of the constructors, methods and properties of Microsoft’s and Aspose’s MailMessage are identical. Could you please try to remove the System.Net.Mail and add Aspose.Network.Mail and update code to fix any errors?
using Aspose.Network.Mail;
//using System.Net.Mail;
Below is an example of basic usage of both Microsoft and Aspose’s MailMessage. I just updated the namespace in class names and both examples compiled and worked successfully.
// Microsoft example
System.Net.Mail.MailMessage msMessage = new System.Net.Mail.MailMessage();
msMessage.Subject = “test”;
msMessage.From = new System.Net.Mail.MailAddress("test@domain.com
");
msMessage.To.Add(new System.Net.Mail.MailAddress("to@domain.com
"));
// Aspose example
Aspose.Network.Mail.MailMessage asposeMessage = new Aspose.Network.Mail.MailMessage();
asposeMessage.Subject = “test”;
asposeMessage.From = new Aspose.Network.Mail.MailAddress("test@domain.com
");
asposeMessage.To.Add(new Aspose.Network.Mail.MailAddress("to@domain.com
"));