title: Having problems with setting up php mail() on Plesk
body: <p>I'm setting up an email form for a website and the mail() function just refuses to work. The server's running Plesk. I'm sure the code's fine, as it runs without a problem on a different web server.</p>
  
  <p>I've set up a no-reply email account and added the from header, but that still didn't fix the issue. Here's my code:</p>
  
  <pre><code>$name = $_POST['name'];
  $email = $_POST['email'];
  $message = $_POST['message'];
  $formcontent="From: $name, $email \nMessage: $message";
  $to = "myemail@differentdomain.com";
  $subject = $_POST['subject'];
  $headers = 'From: noreply@mydomain.com' . "\r\n" .
  'Reply-To: $email' . "\r\n" .
  'X-Mailer: PHP/' . phpversion();
  
  mail($to, $subject, $formcontent, $headers);
  </code></pre>
  
  <p>Any ideas? </p>
  
  <p>Thanks,
  Ilian</p>