Hii
I Want to extract text data from mail body and create new text file for extracted data
i am facing so many problems but cant get a solutions
please help me
Hi
Welcome to uipath forum
Hope the below steps would help you resolve this
-
Use get outlook or any get mail activity and get the output with a variable of type mailmessage named out_mailmes
-
Now use a FOR EACH activity and pass the above variable as input and change the type argument as System.Net.Mail.MailMessage
-
Inside the loop use a Assign activity like this
str_mailbody = item.Body.ToString -
Then use a WRITE TEXT FILE activity and pass the above string variable as input and mention the filepath as
“Yourfolderpath\”+”yourfilename”+”_”+Datetime.Now.ToString(“hh_mm”)+”.txt”
That’s it’s
Cheers @kailas_jadhav
The filename is dynamic multiple mails body data i want extract and the .tex file will create the file with the name of mail subject
Yeah here instead of the expression I shared as filepath mention as item.Subject+”.txt”
Cheers @kailas_jadhav
Thanks It’s working
Glad @kailas_jadhav