Ok, the following is how I send emails from PHP. Uses PHPMailer. In XAMPP you need to tell it where your normal email connection is.
$host = substr($_SERVER['HTTP_HOST'], 0, 5);
if (in_array($host, array('127.0', '192.1', 'local')))
{
$local = TRUE;
// echo "Local is true, HOST is $host";
}
else
{
$local = FALSE;
// echo "Local is false, HOST is $host";
}
if ($local)
{ // tests for using XAMPP locally
ini_set('sendmail_from', 'your email address'); // needed for Win 10 localhost (Development)
ini_set('SMTP', 'your email service SMTP server'); // needed for Win