title: PHP 'mail()' Function Not Sending Email
body: <p>I'm using a basic script on a 1&amp;1 hosted server:</p>
  
  <pre><code>$recipient = "email@domain.com";
  $sender_name = $_POST['name'];
  $sender_email = $_POST['email'];
  $subject = $_POST['subject'];
  $message = $_POST['message'];
  
  $headers = "MIME-Version: 1.0"."\r\n";
  $headers .= "Content-type:text/html; charset=UTF-8"."\r\n";
  $headers .= "From: {$sender_name} &lt;{$sender_email}&gt;"."\r\n";
  $headers .= "Reply-to: {$sender_name} &lt;{$sender_email}&gt;"."\r\n";
  
  mail($recipient, $subject, $message, $headers);
  </code></pre>
  
  <p>..but for some reason am not receiving any emails, nor any errors as per <a href="https://stackoverflow.com/questions/18854572/php-mail-function-not-sending-email">PHP mail() function not sending email</a> instructs.</p>
  
  <p>I thought this may be a server issue but <a href="https://help.1and1.com/hosting-c37630/scripts-and-programming-languages-c85099/php-c37728/send-e-mails-using-php-a657019.html" rel="nofollow noreferrer">1&amp;1 states</a> that it is fully supported. I've also sent emails from this server/hosting before using just a recipient, subject and body and so I'm rather unsure as to why it is not working now!</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Sending without headers, i.e.:</p>
  
  <pre><code>mail($recipient, $subject, $message);
  </code></pre>
  
  <p>..does work, so it would appear to be an issue with using the headers?</p>