Jump to content

ronsebastian4

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by ronsebastian4

  1. My os: Ubuntu 12.10 My server: Apache2.2 with PHP5 and MySQL support my php.ini file: ; For Unix only. You may supply arguments as well (default: "sendmail -t -i").; http://php.net/sendmail-pathsendmail_path = "/usr/sbin/sendmail -t -i" I have sendmail installed... but when i run this php script on my local machine: <html><body> <?phpif (isset($_REQUEST['email']))//if "email" is filled out, send email { //send email $email = $_REQUEST['email'] ; $subject = $_REQUEST['subject'] ; $message = $_REQUEST['message'] ; $res = mail("myemailid@gmail.com", $subject, $message, "From:" . $email); if($res){ echo "Thank you for using our mail form"; }else{ echo "Error!"; } }else//if "email" is not filled out, display the form { echo "<form method='post' action='mailform.php'> Email: <input name='email' type='text'><br> Subject: <input name='subject' type='text'><br> Message:<br> <textarea name='message' rows='15' cols='40'> </textarea><br> <input type='submit'> </form>"; }?> </body></html> The page reload happens for a long time and then "Error!" is printed! Any help guys?
×
×
  • Create New...