Namunukula Posted November 10, 2007 Share Posted November 10, 2007 I am new to PHP. I created feedback form. but it is not working. Pls help me.After running my program, there is a error message like this.Warning: Failed to Receive in c:\phpdev\www\tutorials\feed_back\sendmail.php on line 8These are my codes.//feedback.html<html><body><form method="post" action="sendmail.php"> Email: <input name="email" type="text" /><br /> Message:<br /> <textarea name="message" rows="15" cols="40"> </textarea><br /> <input type="submit" /></form></body></html>This is "sendmail.php" file<?php $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; mail( "namunukula@gmail.com", "Feedback Form Results", $message, "From: $email" ); //header( "Location: http://www.example.com/thankyou.html" );?>Please explain me what can I do for this. Link to comment Share on other sites More sharing options...
Jesdisciple Posted November 10, 2007 Share Posted November 10, 2007 Do you have a mailserver? 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 sendmail.php on line 11If you do, I can't be much help, so I kinda hope you don't... (as I would rather have less functionality if that's what it costs to find the stinkin' bug). Link to comment Share on other sites More sharing options...
justsomeguy Posted November 12, 2007 Share Posted November 12, 2007 It sounds like the mail server is not behaving itself. Make sure that the smtp settings are correct in php.ini. If you have access to the mail server try to use it to send mail with other clients and make sure it's working correctly. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.