Note that there are some explanatory texts on larger screens.

plurals
  1. POCan someone find where's wrong in this code PHP email
    primarykey
    data
    text
    <p>I'm not receiving mails on the email mail@example.com. Below is my form code and my send-mail.php code. Can anyone help me with this cause everything seems working great bu i'm not receiving any emails. I'm using localhost as the server.</p> <p>Contact form:</p> <pre><code>&lt;form id="contactForm" action="#" method="post"&gt; &lt;p&gt;Email us by filling in the form below. Make sure you fill in the message and all fields.&lt;/p&gt; &lt;fieldset&gt; &lt;div&gt; &lt;input name="name" id="name" type="text" class="form-poshytip" title="Enter your name" /&gt; &lt;label&gt;Name&lt;/label&gt; &lt;/div&gt; &lt;div&gt; &lt;input name="web" id="web" type="text" class="form-poshytip" title="Enter your surname" /&gt; &lt;label&gt;Surname&lt;/label&gt; &lt;/div&gt; &lt;div&gt; &lt;input name="email" id="email" type="text" class="form-poshytip" title="Enter your email address" /&gt; &lt;label&gt;Email&lt;/label&gt; &lt;/div&gt; &lt;div&gt; &lt;textarea name="comments" id="comments" rows="5" cols="20" class="form-poshytip" title="Enter your comments"&gt;&lt;/textarea&gt; &lt;/div&gt; &lt;!-- send mail configuration --&gt; &lt;input type="hidden" value="mail@example.com" name="to" id="to" /&gt; &lt;input type="hidden" value="Enter the subject here" name="subject" id="subject" /&gt; &lt;input type="hidden" value="send-mail.php" name="sendMailUrl" id="sendMailUrl" /&gt; &lt;!-- ENDS send mail configuration --&gt; &lt;p&gt;&lt;input type="button" value="Send" name="submit" id="submit" /&gt; &lt;span id="error" class="warning"&gt;Message&lt;/span&gt;&lt;/p&gt; &lt;/fieldset&gt; &lt;/form&gt; &lt;p id="sent-form-msg" class="success"&gt;Form data sent. Thanks for your feedback.&lt;/p&gt; &lt;!-- ENDS form --&gt; </code></pre> <p>and here is the send-mail.php</p> <pre><code>&lt;?php //vars $subject = $_POST['subject']; $to = explode(',', $_POST['to'] ); $from = $_POST['mail@example.com']; //data $msg = "NAME: " .$_POST['name'] ."&lt;br&gt;\n"; $msg .= "EMAIL: " .$_POST['email'] ."&lt;br&gt;\n"; $msg .= "WEBSITE: " .$_POST['web'] ."&lt;br&gt;\n"; $msg .= "COMMENTS: " .$_POST['comments'] ."&lt;br&gt;\n"; //Headers $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=UTF-8\r\n"; $headers .= "From: &lt;".$from. "&gt;" ; //send for each mail foreach($to as $mail){ mail($mail, $subject, $msg, $headers); } ?&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.
 

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