Sending email from localhost

Solution 1:

If you want to send emails from localhost directly, you need to install a Mail Transport Agent (MTA), or if you like, a SMTP service.

IIS provides one. You can otherwise find some others on Google.

You can also change your php.ini mail settings. This won't use localhost per say to send emails, but a relay host that will allow you to send emails from a PHP script.

Solution 2:

Not unless you install a SMTP server on it. I think XAMPP includes one, but you're probably better off just using an existing external server. You can set this with the php.ini SMTP setting.