title: Sending email with PHP from an SMTP server
body: <pre><code>$from = "someonelse@example.com";
  $headers = "From:" . $from;
  echo mail ("borutflis1@gmail.com" ,"testmailfunction" , "Oj",$headers);
  </code></pre>
  
  <p>I have trouble sending email in PHP. I get an error: <code>SMTP server response: 530 SMTP authentication is required</code>.</p>
  
  <p>I was under the impression that you can send email without SMTP to verify. I know that this mail will propably get filtered out, but that doesn't matter right now.</p>
  
  <pre><code>[mail function]
  ; For Win32 only.
  ; http://php.net/smtp
  SMTP = localhost
  ; http://php.net/smtp-port
  smtp_port = 25
  
  ; For Win32 only.
  ; http://php.net/sendmail-from
  sendmail_from = someonelse@example.com
  </code></pre>
  
  <p>This is the setup in the <code>php.ini</code> file. How should I set up SMTP? Are there any SMTP  servers that require no verification or must I setup a server myself?</p>