First, set up your php.ini like so:
[mail function]
; For Win32 only.
SMTP = localhost
SMTP_port = 25
; For Win32 only.
sendmail_from = [email]emmahodd2@hotmail.com[/email] (or whatever your email address is)
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
;sendmail_path =
Next, you need to install a mail server on your computer. When testing this functionality myself, I used MailTraq. It's a professional package, but they have a free version for using on your personal computer. You can get it here.
Hope that helps!