Monday, 2 March 2015

PHP Script for Sending email

<?php

   $to = "omchandmaurya1@gmail.com";
  
   $subject = "This is subject";
  
   $message = "This is simple text message.";
  
   $header = "From:omnetworkom@gmail.com \r\n";
  
   $retval = mail ($to,$subject,$message,$header);
  
   if( $retval == true ) 
   {
      echo "Message sent successfully...";
   }
   else
   {
      echo "Message could not be sent...";
   }

?>

No comments:

Post a Comment