title: WampServer: Warning: mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first
body: <p>I am having an issue with WampServer, I tried creating a contact form but it isn't working. BIOS stopped recognizing my 2GB RAM chip so my system thinks it's 32-bit instead of 64-bit. Here's the PHP error table:</p>
  
  <pre><code>( ! ) Warning: mail(): SMTP server response: 530 5.7.0 Must issue a STARTTLS command first. 8sm9902426ioe.8 - gsmtp in C:\Users\miner\Desktop\Configuration Creator\www\contact\mail.php on line 10
  Call Stack
  #   Time    Memory  Function    Location
  1   0.0004  245672  {main}( )   ..\mail.php:0
  2   0.0004  246648  mail ( )    ..\mail.php:10
  </code></pre>
  
  <p>Here's my code:</p>
  
  <p>contact.html</p>
  
  <pre><code>&lt;form action="mail.php" method="POST"&gt;
      &lt;input type="text" class="form-control" name="name" placeholder="Name"&gt;
      &lt;div class="padded-bottom"&gt;&lt;/div&gt;
      &lt;input type="text" class="form-control" name="email" placeholder="Email"&gt;
      &lt;div class="padded-bottom"&gt;&lt;/div&gt;
      &lt;input type="text" class="form-control" name="subject" placeholder="Subject"&gt;
      &lt;div class="padded-bottom"&gt;&lt;/div&gt;
      &lt;textarea type="text" class="form-control no-resize paragraph" rows="8" name="message" placeholder="Message"&gt;&lt;/textarea&gt;
      &lt;div class="padded-bottom"&gt;&lt;/div&gt;
      &lt;button type="submit" class="btn btn-default"&gt;Submit&lt;/button&gt; &lt;button type="reset" class="btn btn-default"&gt;Clear Form&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>mail.php</p>
  
  <pre><code>&lt;?php
  $name = $_POST['name'];
  $email = $_POST['email'];
  $subject = $_POST['subject'];
  $message = $_POST['message'];
  $from = 'From: '. $name; 
  $to = 'email@example.com'; 
  $subject = $subject;
  $body = "From: $name\n Email: $email\n Message:\n $message";     
  if (mail ($to, $subject, $body, $from)) { 
      echo '&lt;p&gt;Your message has been sent!&lt;/p&gt;';
  } else { 
      echo '&lt;p&gt;Something went wrong. Please manually &lt;a href="mailto:email@example.com"&gt;email me&lt;/a&gt; and include a screenshot/copy of the log above.&lt;/p&gt;'; 
  }
  ?&gt;
  </code></pre>
  
  <p>and finally, php.ini</p>
  
  <pre><code>[mail function]
  ; For Win32 only.
  ; http://php.net/smtp
  SMTP = smtp.gmail.com
  ; http://php.net/smtp-port
  smtp_port = 587
  
  ; For Win32 only.
  ; http://php.net/sendmail-from
  sendmail_from = email@example.com
  </code></pre>
  
  <p>Sorry if it's a duplicate, my problem is different than others.</p>