Hello everyone,
I am trying to figgure out why this function is not working. It's probably something simple but I can't find it.
function mail_to($value)
{
$email = $value['mail'];
$subject = 'Account Registration';
$message = 'Your Username is: '.$value['username'].'\n\nYour Password is: '.$value['password'];
$headers = 'From: stuff@things.com' . "\r\n" .
'Reply-To: stuff@things.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
if (mail($email, $subject, $message, $headers))
{
echo "User information successfully sent to ".$email."";
}
else
{
echo "Email undeliverable.";
}
}
When I run it, it says "Email undeliverable" and ideas?