How to save an .eml attachment from an IMAP message

Hello to the whole community.

Today I would like to expose a problem that I cannot solve and I have not found suitable solutions in the forum.

In practice I would need to download an email grafted by an IMAP message and unfortunately I can’t find such a problem.

Can anyone help me out?

Thanks in advance to everyone.

Hi
we can use SAVE MAIL MESSAGE ACTIVITY with folder path where we want to save the file

Cheers @momi_fede

Hello @Palaniyappan

thank you for responding to my request.
Save Mail Message It allows us to save an e-mail or I also consider to save the mail within the IMAP message?

yes of course
it can save the mail message obtained from IMAP as well
we need to mention the folder path and the input mail
–the sequence would be like this
–get IMAP mail activity and get the output with list of mailmessages
–now use a FOR EACH loop and pass the above variable as input and change the type argument as System.Net.Mail.MailMessage in the property panel
–inside the loop use this SAVE MAILMESSAGE ACTIVITY and mention the mail input as item
and the folder path where it has to saved

important note:’ while mentioning the file path we need too mention the filename as well like this
"yourfolderpath\yourfilename.eml"

Cheers @momi_fede

hi @Palaniyappan I tried to do as you suggested but unfortunately it doesn’t work. The robot saves the email I’m reading instead of saving the email attached to the email

Aah ok got it
In that case we can use save attachment activity
In the same process as mentioned above instead of save mailmessage

Cheers @momi_fede

@Palaniyappan I tried to do it even though it didn’t work. I think this is due to the fact that the email I want to download is a grafted email