How can I get the data of an email from its ID?

I have a process in which I have the IDs of each of the emails obtained, I need to retrieve all the email data from the ID, to be able to move each email to a specific folder. How could I do it?

Hi @Marisa_Ontiveros1

What u mean data of ID ?

Can u please elaborate

ID = mail.Headers(“UID”).ToString

This method allows me to obtain the ID number of each email received. Where ID is a string variable. The received emails are a variable of type mailmessage. I would like to know if from this ID number I could obtain the rest of the email data, that is, the subject of the email, body etc.

Thank you

Extrat the body and use regex

Hi @Marisa_Ontiveros1

please check the below xaml might help you,


image
[GetmailContent.xaml|attachment]
(upload://3h5Hc7XFjBG10sQpHSPDJQhvimn.xaml) (8.6 KB)

Thanks
Latika

I only have the IDs of each email of string type, and I need to obtain the email data (subject, body, etc.) from that ID. Is there a way?

Thank you

@Marisa_Ontiveros1 How did you solve this?