To log your emails in Salesforce via API, head over to the Salesforce configuration page and click Log email activity to Salesforce via API. This functionality requires you to be on the Enterprise edition of Salesforce or the Professional edition if you've purchased the Integration via Web Services API
When using API logging, you'll have to set up your logging preferences:
Once that's set up, click Save Changes