title: Do I need to configure my Nginx server to send PHP mails?
body: <p>I am trying to send an email through php. But the mail() function keeps returning FALSE even though I am sure everything is correct.</p>
  
  <p>After browsing through stackoverflow for similar problems, one answer stood out by saying that it could also be because of the server.</p>
  
  <p>NOTE: The mail server part of the nginx server isn't configured yet. I have no idea if PHP needs that specific module in order to work.</p>
  
  <pre><code># $email and $randomPassword already defined.
  
  $subject = "New Password";
  $message = "Your new password is ".$randomPassword;
  $headers = 'From: contact@mail.com' . "\r\n" .
             'Reply-To: contact@email.com';
  
  $checkMail = mail($email, $subject, $message, $headers);
  
    if ($checkMail) {
      echo "Mail send";
    } else {
      echo "Mail not send";
    }
  </code></pre>