How should I be able to store the date and time the email was received? and save the data in a table in Excel.
You can use mailMessage.Date to get date of the mail recieived
These to give an array of dates of the mail recieved, then loop through the array and add to datatable using add data row Activity
Hi @Famui_Yanisa ,
You can extract the date from the email as a DateTime variable type with EmailReceiveTime = CDate(mail.Headers(“Date”)), and then simply covert that received date into the time format you need, like this: EmailTime = TimeEmailReceived.ToString(“HH:mm”) …
Then add 1 columns "Time received "in Excel to write
-create file to save mail and time
-get list mail
-for each mail to get body and time
-write cell to write value of body and time to excel file
I sent xaml file and ouput file, you can try it
Hope it help
You can use mailMessagevariable. receiveddate to get the date of the mail received.
Say the output of get mail is mailsout …then you can loop through the variable using for loop to get each mail
Then currentitem.Date will give you the datetime of mail and this can be added to datatable using add datarow and after loop write the data back to excel
You can use the below syntax to get the Date and time of Each Mail.
In For each Mail activity take an assign activity, CurrentMail.Headers(“Date”)
Hope it helps!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.