Validation on setting properties in MailMessage are restrictive (C# .NET)

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.



I have observed your requirement and request you to please provide a working sample code along with source files with such limitation in email address. We will log the issue based on that in our issue tracking system to further investigate the possibility of implementing the requested support by avoiding standard format.