>Will I have to install a mail server to get this working
>or is there some way to access something like my gmail account?
Yes and no: it works only (and really only) if your SMTP account does not require userid/password for sending emails. But most (or all) email providers do not offer such "open relays".
You should download the phpmailerclass from sourceforge, which is a powerfull email class that solves all problems that come with the really "poor" mail()-function of PHP. See http://phpmailer.codeworxtech.com/