Free Support Forum - aspose.com

Mail Date issue


#1

We are finding that when a sent mile msg is opened in outlook 2016 the data displayed is always the current date and time and not the actual date the email was sent.
Aspose Email 18.10.0.0 VB net
Please refer to the attached screen shots29-Nov-2018 3-59-40 PM.png (28.1 KB)
29-Nov-2018 3-58-50 PM.png (39.4 KB)


#2

@Andre123

You may need to set message date to current date while sending message.
Moreover, please share MSG file and your code for further investigation.


#3

Thanks for your reply
One of the screen shot clearly shows the date of the msg eg 5/17/2018 where as the message displays in
outlook as todays date and time. I can assure you the date was set.
The code is simply thus
Select Case fileInfo.Extension.ToUpper
Case “.EML”
Try
Dim Msg As Aspose.Email.MailMessage = Aspose.Email.MailMessage.Load(EmailHistoryGridEX.CAposeSaved Message.zip (25.8 KB)
urrentRow.Cells(“AttachmentPath”).Value.ToString)
Dim temp As String = My.Computer.FileSystem.CombinePath(VADataCacheClass.VaTempStorage, GetGUID & “.msg”)
Msg.Save(temp, Aspose.Email.SaveOptions.DefaultMsgUnicode)
Process.Start(temp)
Catch ex As Exception…

Sorry the attachment seem s to have inserted itself in the middle of my text


#4

@Andre123

We are sorry for inconvenience.
We have received two files and both have different dates. We found that none of the file is showing current date time. Our understanding is that after saving “Original.eml”, the date of resulting “AposeSaved Message.msg” should be sent date time not the current date time. When we open it with Outlook it is not showing current date time. So kindly help us understand this issue and correct us what we have missed.


#5

Hello
I have discovered that the following code dates the new email as the current date and time. I would NOT expect this to happen

Case “.EML”
Try
Dim Msg As Aspose.Email.MailMessage = Aspose.Email.MailMessage.Load(EmailHistoryGridEX.CurrentRow.Cells(“AttachmentPath”).Value.ToString)
Dim temp As String = My.Computer.FileSystem.CombinePath(VADataCacheClass.VaTempStorage, GetGUID & “.msg”)

                        **Msg.Save(temp, Aspose.Email.SaveOptions.DefaultMsg)**

or
** Msg.Save(temp, Aspose.Email.SaveOptions.DefaultMsgUnicode)**

                        Process.Start(temp) will show the mail message outlook BUT with the current date and time NOT the original Date and time of the Email

#6

@Andre123

Thank you for your feedback.

We have logged this issue with ID “EMAILNET-39266” for further investigation. You will automatically be informed here once we have more information to share.


#7

Unfortunately the automatic advice has NEVER worked for me…perhaps you would be kind enough to look into this and fix it
Thanks


#8

@Andre123,

I suggest you to please try using following sample code on your end to serve the purpose.

var filename = Path.Combine(TestUtil.GetTestPath("EMAILNET_39266"), "Original.eml");
MailMessage message = MailMessage.Load(filename);
MsgSaveOptions opt = SaveOptions.DefaultMsgUnicode;
opt.PreserveOriginalDates = true;
message.Save(filename + "_2.msg", opt);