INserting (fetching) email via API

INserting (fetching) email via API

Hello,
Is it possible to insert (upload) and email via the CRM API?

That should of course include the ability to define which object to "associate" the email with, and all the relevant email fields (Subject, From, To, CC etc) with the body (in HTML or free text).

If yes, is there a sample code available?

Thanks,