How to send mail using PHP

  1. <?php  
  2. $to = "[email protected]"// send mail  
  3. $subject = "dummy test"// mail subject`  
  4. $body = "Body of your message here you can use HTML too. ";  
  5. $headers = "From: [email protected]\r\n";// mail from  
  6. $headers .= "Reply-To: [email protected]\r\n";  
  7. $headers .= "Return-Path: [email protected]\r\n";  
  8. $headers .= "X-Mailer: PHP5\n";  
  9. $headers .= 'MIME-Version: 1.0' . "\n";  
  10. $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";  
  11. mail($to,$subject,$body,$headers);  
  12. ?>