Hi,
I am in localhost.
I am doing the following exercise in order to test sending e-mail from PHP mail function:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document sans titre</title>
</head>
<body>
<?php
$to = "[email redacted]";
$subj = "Test";
$mess = " Ceci est un test de mail";
$headers = "bcc: [email redacted]";\r\n /*ligne corrigée par rapport à l'exemple du livre */
$mailsend = mail($to,$subj,$mess,$headers);
echo $mailsend;
?>
</body>
</html>
and I get the following error:
Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\wamp\www\TESTPHP\Test-mail.php on line 15
Any idea of what is going wrong and what to do?
Thanks in advance.