How to read .eml type files content

How to read the content of an .eml (E-mail Message) type file in human readable format, not in coding? The file is an attachment and saved to local path from Outlook mail.

Hi @ext-o

By using the Use application\browser activity you can launch that eml file in the desktop. After that use the Get text activity or other Ui activities to scrap the required data from eml file.

Hope it helps!!

How to specify the properties of Use Application/Browser activity so that it opens the locally stored .eml file?

Hi
may be first we can convert the eml file to .mailmessage with this custom component

once mailmessage object is created we can read the other objects from that like subject, body, attachment

Cheers @ext-o

Hi @ext-o

Could you please specify what exact data has to be extracted from the specified .eml file content?

Best Regards.

Hi @ext-o

Use “Read Text File” Activity :

  • In the properties of this activity, configure it to read the .eml file you want to extract the content from. Set the “FileName” property to the path of your .eml file.

  • Then, Create a variable to store the content of the .eml file. To do this, click on the “Variables” pane, create a new variable of type String , and give it a meaningful name like emailContent

Use Assign Activity

  • In the “To” field of the Assign activity, assign the variable you created (e.g., emailContent).
  • In the “Value” field, use the output from the “Read Text File” activity (e.g., Read Text File Output). This will store the content of the .eml file in your variable.
  • save it to a text file using the “Write Text File” activity.