This might not be relevant here but I'll give it a shot.

I have a client who wants to build a database of email addresses of people who contact him via his website contact form.

What's the best way to go about doing this?

It needs to be automatic, so that as soon as someone fills out the contact form and sends, the email is saved into a list somewhere.

Can anyone point me in the right direction?