title: php send mail code not working
body: <pre><code>$to = "jijodasgupta@gmail.com";
  $subject = "Hi!";
  $body = "Hi,\n\nHow are you?";
  if (mail($to, $subject, $body)) {
    echo("pMessage successfully sent!/p");
  } else {
    echo("pMessage delivery failed.../p");
  }
  </code></pre>
  
  <p>Wrote a basic php sendmail code that but it gives me the following error:</p>
  
  <blockquote>
    <p>Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or
    custom "From:" header missing in C:\xampp\htdocs\mail.php on line 5
    Message delivery failed...</p>
  </blockquote>
  
  <p>I changed the ``php.ini file and put <code>sendmail_from=jijodasgupta@gmail.com</code> but still the problem persists.
  Writing the mail script for the first time.</p>
  
  <p>Am I doing something wrong? Is there a better way to do this?</p>