fazlionline Posted June 22, 2009 Report Share Posted June 22, 2009 (edited) Hi all I have a simple form and php script which sends user information (form form) to my email. When I user enter his name, email and message in the form and press the send button, he get the error and no email go to my inbox PHP Code: <?php $to = myemail@yahoo.com'; $name = '$_POST[urname]'; $message = '$_POST[urmessage]'; $headers = 'From: webmaster@example.com' . "\r\n" . 'Reply-To: webmaster@example.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $name, $message, $headers); ?> Is anything wrong with the script? Thanks Edited June 22, 2009 by fazlionline Quote Link to comment Share on other sites More sharing options...
fazlionline Posted June 22, 2009 Author Report Share Posted June 22, 2009 (edited) 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 E:\inetpub\vhosts\fazlionline.com\httpdocs\help\email_jlhaslip3.php on line 9 I am not using wamp, I have my files on server! http://www.fazlionline.com/help/email_jlhaslip3.html Edited June 22, 2009 by fazlionline Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.