Download mail on file and containing the date

Hi.
To download mails (to files) I only found the SaveMailMessage activity. I read that it returns .eml files (and the file does not save the date of the mail). I tried to go down to msg extension and it gives me error.It doesn’t have many properties (so I didn’t find options to try to retrieve the date).
I tried to search to search inside the variable that I called mail, the date as Date, but I could not find.
If mail.Subjet, mail.Body, etc. worked for me But I couldn’t with mail.Date.

Can someone help me?
Thank you
Marcelo

Hey @MarceloPassadore, i’m not sure if i understand your question.

So you want to save an email attachment by its date for example. if an email came through today you want to save its file attachments as (05/05/2020).

and again, which date do you want, the date that an email was sent to you or its a date on the attachment?

If what I’m saying is not what you want, please explain again and if possible attach screenshots or even your .xaml file if that’s okay.

Thank SenzoD

It is for a post management. It is interesting to record the date the email arrived.
In .msg files the date remains when the file is downloaded. In .eml files there is no date. I am interested in keeping the date, or obtaining it in some other way.
Send screenshot of heads of both types of files


Send screenshot. On the left a file with an .eml extension and on the right .msg.
Above I marked with red where the date comes in the .msg and not in the .eml
That is the date the email arrived.
Thank you so much

@MarceloPassadore, oh i think i understand

So look at the screen short below, i am saving my email (.eml) to a folder the name of the email will be todays date.

So in your case just so you have the date, you can open the original mail and read the date save that date on variable and where i put DateTime.Now just parse in your variable, the file name will contain the date, unfortunately, this will not look like the original mail but in a way, it helps you know the date.

this is interesting, i have never done it before, i will research and should i find a better way i will let you know.

Sanzo, hits information you sent me is NOT useful for what I need now. But it is very interesting information, which can be used for other cases. Thank you. You’re very kind

I need to get the date the email was received

Hi.

You can get the receive date of mail by below mailmessage object property.
mail.Headers(3).ToString
Please try it.

HI, Mengqingyi2019.

Returns the information I wanted.
Thank you.
Now I will see the format.

THANK YOU!!!