Hey @Hemant, looping through emails and downloading the attachments in a good example of automation and it can be achieved using UiPath Studio. Following steps can automate this task:
1. Create a new Sequence and drag Get POP3 Mail Messages activity. Then create email, password and mailList variables and assign your login credentials like mail_id and password to email and password variables.
2. Now go to the Properties of Get POP3 Mail Messages and set Port as 995, Server as "pop.gmail.com'. In Logon section enter your email and password variables. Also store output of this activity into mailList.
3. Next, add a ForEach activity to loop through the mailList. In Properties, set Type Argument as System.Net.Mail.MailMessage:
4. Inside ForEach, drag If activity to check whether the mail has an attachment or not.
5. If the email contains an attachment, then use Save Attachment activity to save that attached file.
Then simply go to the downloaded files folder and you can find all the attachments from your emails.