- how to get subject from get mail
- how to get headers item in reply to
for subject - use item.Subject
header items might not exist for all items . You can use item.Header.keys to check if it has any data
cheers
Subject works
But headers throwing error
As I said all the emails might not have headers. SO first you need to do a count of keys to check if the header is present only then you can check for required keys.
item.Header.keys.count will give the count
Let me know why you want to use header data may be that might help to point you in right direction
cheers
I want to exrtract the sent date from sent items so i use item.Headers(“date”)
But it is not showing results so what to do in microsoft 365 get mails
okay checking
Please use item.LastModifiedDateTime which will give you the required date and time
cheers
Im assigning values to get mail so when i put item.LastModifiedDateTime it says compiling error
are you using office 365 get mail? because I see the mailmessage type is different. Can you check in the type argument of for loop and change the type argument appropriately to office365mailmessage
cheers
Please don’t use headers. use item.LastModifiedDateTime for the date that you need
cheers
Use item.LastModifiedDateTime.ToString() as you are trying to assign the value to string
cheers
sure will do but i have typed something but due to internet issue couldnt convey my whole message
Actually i need one help like im trying this automations for more than 15 days so could you please help me on this?
how to retrieve Microsoft 365 get mails like whether i have replied for that mails or not from sent items, so may i know how to do that?
good to know .Happy Automation. Please mark the solution so that it helps others
cheers
So …you want to know if a message is replied or not… there is no direct way but you can try this… from get mails once you get your inbox …and getting the mail you can get the unique id of the mail and then use get mail from sent items and then match the id for this your in-reply-to in header will help to match.thats not straight but give it a try
Cheers
Happy birthday @Anil_G
Actually the headers is not working…previously it was working in get imap but
item.headers.item(“In-reply-to”) is not working in either in o365 and exchange get mails
Thank you so much … that will work only for sent items…so try that header in sent…first check what keys you are getting. Wven i will check it but as of now little away from laptop…will give you update as well
Cheers