‘Warning: 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:\xampp\htdocs\HTML\Test Web\preview.php on line 115’
Mình gặp 1 lỗi như thế này và đây là đoạn code
*Tips:Đã che email và chỉnh php.ini
$to = "*************@gmail.com";
$subject = "Contact mail";
$from=$_POST["email"];
$msg=$_POST["msg"];
$headers = "From: $from";
mail($to,$subject,$msg,$headers);
echo "Email successfully sent.";
Mong mọi người giúp!!