I have the need to convert some old emails that I have from mht to msg file types.
Some of the mht’s have ‘to’ / ‘from’ fields that do not conform to the a@b.c format - they’re just the ‘a’ part.
The library won’t allow me to set the. From on a msg with a non-conforming email address:
using (var message = Aspose.Email.MailMessage.Load("source.mht"))
{
message.From = new MailAddress("somename"); // throws exception.
}
It would be beneficial if I could set those values even if they’re not correct. Possibly be able to configure it to ignore those kinds of validations.
It’s important to preserve the From / To exactly for hash matching later, so I cannot set the .From to something different than what was in the mht.
Thanks.