I would like to send email through php code hosted locally.
<?php
$email = "myemail@local.com";
$titre = "My subject";
$message = "Text message !";
mail($email, $titre, $message);
?>
When I run this code, I get the following error :
Warning: mail() [<a href='function.mail'>function.mail</a>]: 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:\...
I went into the php.ini
file and it seems to be already well configured.
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
How can I fix this ?
Thank you