Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP Email Form not sending mail with PostFix installed
    primarykey
    data
    text
    <p>I have a very basic email form on my website, www.waldoswall.com that I am building as a portfolio piece. I am having issues getting the mail form to send mail to my email address. I found a tutorial and installed PostFix as per the instructions here: <a href="https://www.digitalocean.com/community/articles/how-to-install-and-setup-postfix-on-ubuntu-12-04" rel="nofollow">https://www.digitalocean.com/community/articles/how-to-install-and-setup-postfix-on-ubuntu-12-04</a></p> <p>I am not certain if it is an issue with how I set up the server (I host from rackspace and try to set up everything myself based on tutorials and my personal knowledge.) or a problem with my php code. I have read a few places that I should check the php log and am confused as to where I might find this file on the server to take a closer look. For now I'll post my code in case something is obviously wrong.</p> <pre><code> &lt;form method="POST" action="verify.php"&gt; &lt;div id="formContent"&gt; &lt;div id="formLeft"&gt; &lt;h3&gt;Name:&lt;/h3&gt;&lt;br /&gt;&lt;input class="whitebg" name="name" type="text"&gt;&lt;br /&gt;&lt;br /&gt; &lt;h3&gt;Email:&lt;/h3&gt;&lt;br /&gt;&lt;input class="whitebg" name="email" type="email"&gt;&lt;br /&gt;&lt;br /&gt; &lt;h3&gt;Phone:&lt;/h3&gt;&lt;br /&gt;&lt;input class="whitebg" name="tel" type="tel"&gt;&lt;br /&gt;&lt;br /&gt; &lt;/div&gt; &lt;div id="formRight"&gt; &lt;div style="clear:both;"&gt;&lt;h3&gt;Message:&lt;/h3&gt;&lt;br /&gt;&lt;textarea class="whitebg" cols="50" name="message"&gt;&lt;/textarea&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;div id="formBottom"&gt; &lt;?php require_once('recaptchalib.php'); $publickey = "6LegNOkSAAAAADFzJsNJtYMJc8bpDMMPY9pm4lBb"; // you got this from the signup page echo recaptcha_get_html($publickey); ?&gt; &lt;p&gt;&lt;input style="margin-top:25px;" class="whitebg" type="submit" value="Submit"&gt;&lt;/p&gt; &lt;/div&gt; &lt;/form&gt; </code></pre> <p>The verify php file contains the following code:</p> <pre><code>&lt;!DOCTYPE HTML&gt; &lt;html&gt; &lt;head&gt; &lt;meta http-equiv="content-type" content="text/html;charset=UTF-8"&gt; &lt;title&gt;Home - Kevin Waldmann&lt;/title&gt; &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" type="text/css" href="css/style.css"&gt; &lt;script type="text/javascript" src="js/script.js"&gt;&lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div id="topSpace"&gt;&lt;h1&gt;Waldos Wall&lt;/h1&gt;&lt;/div&gt; &lt;div style="padding:25px;" class="contentPane" id="slideVerify"&gt; &lt;div id="goHomeBg"&gt; &lt;div class="navItem unselectable" id="goHome" onclick="window.location = 'http://www.waldoswall.com';"&gt;Go Home&lt;/div&gt; &lt;?php require_once('recaptchalib.php'); $privatekey = "6LegNOkSAAAAACO0vWlqLWRZTkkpntcAM3IHHiaw"; $resp = recaptcha_check_answer ($privatekey, $_SERVER["REMOTE_ADDR"], $_POST["recaptcha_challenge_field"], $_POST["recaptcha_response_field"]); if (!$resp-&gt;is_valid) { // What happens when the CAPTCHA was entered incorrectly die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." . "(reCAPTCHA said: " . $resp-&gt;error . ")"); } else { // Your code here to handle a successful verification $to = "kjwaldmann@gmail.com"; $subject = "Waldos Wall Contact Form"; $message = "Hello Kevin!&lt;br/&gt;" . "Name:" . $_REQUEST["name"]. "\r\n" . "Email:" .$_REQUEST["email"] . "\r\n" . "Telephone:" . $_REQUEST["tel"] . "\r\n" . "Message:" .$_REQUEST["message"]; $from = $_REQUEST["email"]; $headers = "From:" . $from; mail($to,$subject,$message,$headers); echo "Message Sent."; } ?&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload