Thursday 15 April 2010

ios - php xampp mail not sent -



ios - php xampp mail not sent -

this question has reply here:

php mail service form doesn't finish sending e-mail 19 answers

i trying implement forgot password feature using php mail service feature.

i using xampp , mac os 10.9.4

i response 1 , there no error message too. mail service isn't sent.

following code:

<?php // error_reporting(e_all); $response = array(); require_once __dir__.'/db_connect.php'; $db = new db_connect(); if(isset($_post['email'])){ $to = $_post['email']; $subject = "password recovery"; $res = mysql_query("select password usermaster email_id = '$to'"); if($res){ $pwd=""; while($row=mysql_fetch_array($res)){ $pwd = $row['password']; // echo $pwd." ".$to; } $result = mail($to, $subject,$pwd); echo $result; die; if($result){ $response["success"]=1; $response["message"]="mail sent successfully"; } else { print_r(error_get_last()); echo $result; die; } }else { $response["success"] = 0; $response["message"] = "error sending mail"; //echo mysql_error(); die; } }else { $response["success"] = 0; $response["message"] = "missing parameters"; } echo json_encode($response); ?>

i googled , found number of solutions none worked in favor. getting wrong? how solve this?

it won't work on localhost. seek on free hosting website , work.

php ios email xampp

No comments:

Post a Comment