-1

I have static ip on my home computer. I am using windows-7 with xampp . I creat the code for sending mail

<?php
   $to = "someone@example.com";
   $subject = "Test mail";
   $message = "Hello! This is a simple email message.";
   $from = "someonelse@example.com";
   $headers = "From:" . $from;
   mail( $to, $subject, $message, $headers );
   echo "Mail Sent.";
?>

but sir mail is not received at destination. I thinks is it possible to send mail from my home computer using windows7 xampp?? plz answer

Tepken Vannkorn
  • 9,648
  • 14
  • 61
  • 86
cam jign
  • 13
  • 4
  • Use gmail (or another) SMTP service. Here's the details: http://stackoverflow.com/a/5374277/570763 – Arda Oct 08 '13 at 07:06
  • just tested your code, working for me... im using xampp out of the box right now. – MAQU Oct 08 '13 at 07:07