MhtMessageFormatter wrong DateTimeFormat

Hello,


We are rendering eml with Aspose.Email, using MhtMessageFormatter to convert the eml into mht.
We are using this code to customize the headers in french but the sent DateTime is not displayed correctly :

using (MailMessage msg = MailMessage.Load(“test.eml”))
{
MhtMessageFormatter formatter = new MhtMessageFormatter();
formatter.FromFormat = formatter.FromFormat.Replace(“From:”, “De :”);
formatter.SentFormat = formatter.SentFormat.Replace(“Sent:”, “Envoyé :”);
formatter.ToFormat = formatter.ToFormat.Replace(“To:”, “À :”);
formatter.CcFormat = formatter.CcFormat.Replace(“Cc:”, “Copie :”);
formatter.SubjectFormat = formatter.SubjectFormat.Replace(“Subject:”, “Objet :”);
CultureInfo culture = new CultureInfo(“fr-FR”);
formatter.DateTimeFormat = String.Concat(culture.DateTimeFormat.LongDatePattern, " ", culture.DateTimeFormat.ShortTimePattern);
formatter.Format(message);

MhtSaveOptions mhtSaveOptions = new MhtSaveOptions()
{
MhtFormatOptions = MhtFormatOptions.HideExtraPrintHeader,
MailMessageSaveType = MailMessageSaveType.MHtmlFormat,
};
using (MemoryStream stream = new MemoryStream())
{
message.Save(
“test.mht”, mhtSaveOptions);
}
}

The Sent Header is rendered as :
Envoyé : Tuesday 29 September 2015 14:58
As you can see the day and the month are in english instead of french.
Is there a way to get the right local formatting for the dates ?

Thanks and best regards,
Christophe PETIOT

Hi Christophe,


Thank you for your inquiry.

At present, there is no such work around method available that we could suggest to achieve this. The date header is not rendered as per the specified culture. We have forwarded this request to our Product team so as to get their feedback about this requirement and shall share once there is some information available. The issue has been forwarded via issue id: EMAILNET-34988.

Hi Muhammad,


Thank you for your answer.
Can you tell us where we can follow the issue ?

Best regards,
Christophe PETIOT

Hi Christophe,

Thank you for writing to Apose support team again.

This issue is still in queue for analysis by the product team due to other high priority tasks. As this ticket is linked with this thread, you will be automatically notified once the issue is resolved and updated dll is available online for download.

Please feel free to write us back if you have any other query in this regard.

The issues you have found earlier (filed as EMAILNET-34988) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.