Jump to content

PHP Form Mail Help


mrodrigues

Recommended Posts

ok so I have no idea what is wrong with my form mail the message processes all the way through and gives a confirmation saying the message has been submitted both with the echo function and using the header to open a separate html document, but yet the e-mail never arrives in my emails inbox, right now my files are hosted on a mac server just for testing purposes so I'm not sure if that is the reason.

 

but here is my php code

<?php

  $to = "myemailwashere";

  $sub = "Support e-mail";

  $from = $_REQUEST['email'] ;

  $message = $_REQUEST['message'] ;

 

  mail( $to,$sub,$message, "From: $from") ;

  echo "Thanks for your submission support will contact you";

?>

 

My form looks like this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>

<head>

<title>Feedback Form</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

 

<body>

<form method="post" action="sendmail.php">

  Email: <input name="email" type="text" /><br />

  Message to Support:<br />

  <textarea name="message" rows="15" cols="40">

  </textarea><br />

  <input type="submit" />

</form>

 

</body>

</html>

 

Link to comment
https://forums.phpfreaks.com/topic/156843-php-form-mail-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.