Mail function was not working, but i am getting success message,but mail was not sent My code is following ,but this code working fine on another one server i can't identify the problem any solution for in this problem.........?
<?php include("conn.php"); if(isset($_REQUEST["mmailid"])) { $to=$_REQUEST["mmailid"]; $rs=mysql_query("select mmailid,mpass,mname from memtb where mmailid='$to'"); $rd1=mysql_num_rows($rs); if($rd1>0) { $rd=mysql_fetch_array($rs); $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=iso-8859-1" . "\r\n"; $headers .= 'Bcc: [email protected]' . "\r\n"; $body="<table border=5 style='border-color:blue'><p><h3><img src='http://www.stephenraj.in/images/logo.jpg' alt='stephen Logo' /></h3></p><p>Dear " . $rd[2] . ",</p><p> Your Password is : " . $rd[1] . " .</p><p>" . "<p><h1> </h1></p><p>SUPPORT Team</p><p>CHANDRASTORE</p></table>"; ini_set("SMTP","localhost"); ini_set("sendmail_from","[email protected]"); $mail=mail($to,"Stephen Password Recovery MAIL",$body,$headers); //mail($tomailid,"Stephen Registration Confirmation MAIL",$body,$headers); if(isset($mail)) { echo "Your Password Was Sent To Your Mail"; // echo $rd[2].$rd[1]; } } else echo 'Invalid Mail ID' } ?>