title: Bad Message Return Path Warning - PHP
body: <p>I'm trying to build a simple contact form for a website, it says "Your mail has been sent." but gives and error at the same time, and e-mail does not come to my inbox.</p>
  
  <p>Error is </p>
  
  <blockquote>
    <p>Warning: mail(): Bad Message Return Path in
    D:\XXXAMP\htdocs\denemeson\index.php on line 38</p>
  </blockquote>
  
  <p>I made the necessary arrangements about SMTP in php.ini and sendmail.ini. </p>
  
  <pre><code>    global $resultMessage;
      global $errorMessage;
      require("class.phpmailer.php");
  
      if(isset($_POST['submit'])){
          $name= $_POST['name'];
          $email= $_POST['email'];
          $subject= $_POST['subject'];
          $message= $_POST['message'];
      if(!$name){
          $errorMessage="&lt;br&gt;Please enter your name..";
      }
      if(!$email){
          $errorMessage.="&lt;br&gt;Please enter your email address";
      }
      if(!$subject){
          $errorMessage.="&lt;br&gt;Subject..";
      }
      if(!$message){
          $errorMessage.="&lt;br&gt;Enter your message..";
      }
      if($errorMessage){
          $resultMessage="Please fill the required informations".$errorMessage;
      }   else{
          mail("xxxxxx@gmail.com", "Contact Form Message", 
              "Sender: ".$name.
              "Mail Address: ".$email.
              "Message: ".$message );
          $resultMessage="Your mail has been sent.";
      }
      }
  </code></pre>
  
  <p>Is there a way to get rid of this error and send the mail?</p>