Actually, you shouldn't need to touch php.ini at all ... all you need to do is put a valid SMTP server in the Moodle settings. This will override any PHP settings.
Admin -> Config -> Variables
John's advice is better for most Unix systems, but Windows doesn't have a built-in mail system.