You need to consult the manual for your SMTP server? Tell it to allow relay from localhost to anywhere. If you have to, allow it to relay for the user IIS or PHP runs as.
If it were postfix I'd be able to give you a better answer.
Have you tested sending an email through your localhost
- to different addresses?
- to the same addresses NOT using PHP?
Anyway, I don't think this is a PHP problem, not sure how strict the board topic police are here, I only just joined.
EDIT: Another thing to check, is the return address is valid. A lot of mailserver on ISPs will first verify the from address, before they will relay the mail for you to the users mailbox.