Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP - Sending Mail is not working
    text
    copied!<p>I've seen some other posts on this, and I'm learning from a book right now. I've followed what the book said and I'm not understanding what I'm missing. </p> <p>I tried not to make it a double post, but the codes are quite different from the ones I read on stackoverflow so here I go. I hope someone can help me. I am a complete beginner.</p> <p>My <code>Basic.php</code> has this script</p> <pre><code>&lt;form action="sendmail.php" method="POST"&gt; &lt;p&gt;&lt;strong&gt;Name:&lt;/strong&gt;&lt;br /&gt; &lt;input type="text" size="25" name="name" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;E-Mail Address:&lt;/strong&gt;&lt;br /&gt; &lt;input type="text" size="25" name="email" /&gt;&lt;/p&gt; &lt;p&gt;&lt;strong&gt;Message:&lt;/strong&gt;&lt;br /&gt; &lt;textarea name="message" cols="30" rows="5"&gt;&lt;/textarea&gt;&lt;/p&gt; &lt;p&gt;&lt;input type="submit" value="send" /&gt;&lt;/p&gt; &lt;/form&gt; </code></pre> <p>My <code>sendmail.php</code> has this script.</p> <pre><code>echo "&lt;p&gt;Thank you, &lt;b&gt;" . $_POST['name'] . "&lt;/b&gt;, for your message!&lt;/p&gt;"; echo "&lt;p&gt;Your e-mail address is: &lt;b&gt;" . $_POST['email'] . "&lt;/b&gt;. &lt;/p&gt;"; echo "&lt;p&gt;Your message was: &lt;br/&gt;"; echo $_POST['message']."&lt;/p&gt;"; //start building the mail string $msg = "Name: " . $_POST['name'] . "\n"; $msg .= "E-mail: " . $_POST['email'] . "\n"; $msg .= "Message: " . $_POST['message'] . "\n"; //set up the mail $recipient = "myemail@gmail.com"; $subject = "Form Submission Results"; $mailheaders = "From: me \n"; $mailheaders .= "Reply To " . $_POST['email']; //send the mail mail($recipient, $subject, $msg, $mailheaders); </code></pre> <p>And here is my <code>php.ini</code> that I've changed (this part I have no clue about).</p> <pre><code>[mail function] ; For Win32 only. ; http://php.net/smtp SMTP = smtp.gmail.com ; http://php.net/smtp-port smtp_port = 465 ; For Win32 only. ; http://php.net/sendmail-from sendmail_from = myemail@gmail.com </code></pre> <p>I'd appreciate any help I can get. Thank you!</p> <p>BTW I'm getting the following error: Warning: mail(): SMTP server response: 530-5.5.1 Authentication Required. Learn more at 530 5.5.1 <a href="http://support.google.com/mail/bin/answer.py?answer=14257" rel="nofollow">http://support.google.com/mail/bin/answer.py?answer=14257</a> wx2sm302658igb.4 - gsmtp in C:\wamp\www\sam\sendmail.php on line 24</p>
 

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