Automatic Log Emails to Contact/Account

I have looked up on cases, but I would like when an email comes in to any of the setup users to automatically be added to that contact or account as a note/email

This can be done only with a bit of custom coding.

Where should I look for this?