PHP Mail Function
- by vgathan
Is it possible to send a mail in PHP without any external packages or tools? If so, is there
any requirement to configure the php.ini file?
Its as follows:
$to = $row-EMail_ID;
$subject = "Reset your password";
$body = "Hi ".$row->Username.", \n\t\t\tA request to reset your password was received from you. \n\n\n";
$headers = "From: [email protected]\r\n"."X-Mailer: php/";
mail($to, $subject, $body, $headers);
The error i get:
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 F:\wamp\www\pwd.php on line 20