I have one document library name InvoiceEmail that contails .eml files in it.

Now I have a requirement that using Remote Event Receiver I have to read To, From and Subject values of the .eml file from InvoiceEmail document library. Also if there is any attachment present in .eml file then save the attachment to some local folder.

I know we can do this in Server Object Model using SPEmailMessage class.

But I am not able to find how to do this in Remote Event Receiver(or CSOM).