Free Support Forum -

Parsing a MailMessage "Received" Header

Does the Aspose toolkit provide an API for converting a RFC822 (e-mail) date to a DateTime object?

I know Aspose can do it internally, since it converts the “Date” header in the MailMessage to a DateTime, but I can’t find a method available to me to do it as well.

For RFC822 dates, the DateTime.Parse method fails for some cases (e.g. “Tue, 9 Mar 2010 10:10:00 -0500 (EST)”), so that is why I can’t simply use that method.



This is being done internally by the API when the email is loaded in a MailMessage instance. And only those methods/properties are kept public which needs to be accessed by the client of the library. I will check if it is possible or feasible for us to expose such method and get back to you.